You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
755 B

  1. [Unit]
  2. Description=Calico per-node agent
  3. Documentation=https://github.com/projectcalico/calico-docker
  4. After=docker.service docker.socket
  5. Wants=docker.socket
  6. [Service]
  7. User=root
  8. PermissionsStartOnly=true
  9. {% if inventory_hostname in groups['kube-node'] and peer_with_router|default(false)%}
  10. ExecStart={{ bin_dir }}/calicoctl node --ip={{ip | default(ansible_default_ipv4.address) }} --as={{ local_as }} --detach=false --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }}
  11. {% else %}
  12. ExecStart={{ bin_dir }}/calicoctl node --ip={{ip | default(ansible_default_ipv4.address) }} --detach=false --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }}
  13. {% endif %}
  14. Restart=always
  15. RestartSec=10s
  16. [Install]
  17. WantedBy=multi-user.target