20 lines
494 B
Text
20 lines
494 B
Text
|
[Unit]
|
||
|
Description=calicoctl node
|
||
|
After=etcd2.service
|
||
|
|
||
|
[Service]
|
||
|
EnvironmentFile=/etc/network-environment
|
||
|
User=root
|
||
|
PermissionsStartOnly=true
|
||
|
ExecStartPre={{ bin_dir }}/calicoctl checksystem --fix
|
||
|
{% if inventory_hostname in groups['kube-node'] %}
|
||
|
ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4} --kubernetes
|
||
|
{% else %}
|
||
|
ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4}
|
||
|
{% endif %}
|
||
|
RemainAfterExit=yes
|
||
|
Type=oneshot
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|