From 4561063592138712ab3bdf1a5b58cbc4ecd5ff52 Mon Sep 17 00:00:00 2001 From: tanshanshan Date: Mon, 7 Aug 2017 17:06:14 +0800 Subject: [PATCH] add node ignore this --- roles/network_plugin/canal/tasks/main.yml | 3 +-- roles/network_plugin/flannel/tasks/main.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/roles/network_plugin/canal/tasks/main.yml b/roles/network_plugin/canal/tasks/main.yml index ea67e20cd..64e3c9197 100644 --- a/roles/network_plugin/canal/tasks/main.yml +++ b/roles/network_plugin/canal/tasks/main.yml @@ -29,8 +29,7 @@ {{ bin_dir }}/etcdctl --peers={{ etcd_access_addresses }} \ set /{{ cluster_name }}/network/config \ '{ "Network": "{{ kube_pods_subnet }}", "SubnetLen": {{ kube_network_node_prefix }}, "Backend": { "Type": "{{ flannel_backend_type }}" } }' - delegate_to: "{{groups['etcd'][0]}}" - run_once: true + when: inventory_hostname == groups['etcd'][0] - name: Canal | Write canal configmap template: diff --git a/roles/network_plugin/flannel/tasks/main.yml b/roles/network_plugin/flannel/tasks/main.yml index 573b51f19..08d8a64e6 100644 --- a/roles/network_plugin/flannel/tasks/main.yml +++ b/roles/network_plugin/flannel/tasks/main.yml @@ -4,8 +4,7 @@ {{ bin_dir }}/etcdctl --peers={{ etcd_access_addresses }} \ set /{{ cluster_name }}/network/config \ '{ "Network": "{{ kube_pods_subnet }}", "SubnetLen": {{ kube_network_node_prefix }}, "Backend": { "Type": "{{ flannel_backend_type }}" } }' - delegate_to: "{{groups['etcd'][0]}}" - run_once: true + when: inventory_hostname == groups['etcd'][0] - name: Flannel | Create flannel certs directory file: