Skip to content
Snippets Groups Projects
Commit a6272994 authored by Matthew Mosesohn's avatar Matthew Mosesohn Committed by GitHub
Browse files

Merge pull request #941 from adidenko/use_ansible_hostname_in_calico

Switch to ansible_hostname in calico
parents 1df50adc 46c177b9
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ Wants=docker.socket ...@@ -7,7 +7,7 @@ Wants=docker.socket
[Service] [Service]
User=root User=root
PermissionsStartOnly=true PermissionsStartOnly=true
{% if inventory_hostname in groups['kube-node'] and peer_with_router|default(false)%} {% if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false)%}
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 }} 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 }}
{% else %} {% else %}
ExecStart={{ bin_dir }}/calicoctl node --ip={{ip | default(ansible_default_ipv4.address) }} --detach=false --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }} ExecStart={{ bin_dir }}/calicoctl node --ip={{ip | default(ansible_default_ipv4.address) }} --detach=false --node-image={{ calico_node_image_repo }}:{{ calico_node_image_tag }}
......
...@@ -7,9 +7,9 @@ CALICO_IP6="" ...@@ -7,9 +7,9 @@ CALICO_IP6=""
{% if calico_network_backend is defined %} {% if calico_network_backend is defined %}
CALICO_NETWORKING_BACKEND="{{calico_network_backend }}" CALICO_NETWORKING_BACKEND="{{calico_network_backend }}"
{% endif %} {% endif %}
{% if inventory_hostname in groups['kube-node'] and peer_with_router|default(false)%} {% if inventory_hostname in groups['k8s-cluster'] and peer_with_router|default(false)%}
CALICO_AS="{{ local_as }}" CALICO_AS="{{ local_as }}"
{% endif %} {% endif %}
CALICO_NO_DEFAULT_POOLS="true" CALICO_NO_DEFAULT_POOLS="true"
CALICO_LIBNETWORK_ENABLED="true" CALICO_LIBNETWORK_ENABLED="true"
CALICO_HOSTNAME="{{ inventory_hostname }}" CALICO_HOSTNAME="{{ ansible_hostname }}"
{ {
"name": "calico-k8s-network", "name": "calico-k8s-network",
{% if not legacy_calicoctl %} {% if not legacy_calicoctl %}
"hostname": "{{ inventory_hostname }}", "hostname": "{{ ansible_hostname }}",
{% endif %} {% endif %}
"type": "calico", "type": "calico",
"etcd_endpoints": "{{ etcd_access_endpoint }}", "etcd_endpoints": "{{ etcd_access_endpoint }}",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment