Removing run_once in these tasks so that etcd ca certs get propogated properly to worker nodes

without this etcd ca certs dont exist on worker nodes causing calico to fail
This commit is contained in:
Brad Beam 2017-07-28 14:34:47 -05:00
parent e0960f6288
commit d09222c900

View file

@ -4,7 +4,6 @@
set_fact: set_fact:
etcd_node_cert_list: "{{ etcd_node_cert_list|default([]) + ['node-' + item + '.pem'] }}" etcd_node_cert_list: "{{ etcd_node_cert_list|default([]) + ['node-' + item + '.pem'] }}"
with_items: "{{ etcd_node_cert_hosts }}" with_items: "{{ etcd_node_cert_hosts }}"
run_once: true
- include: ../../vault/tasks/shared/sync_file.yml - include: ../../vault/tasks/shared/sync_file.yml
vars: vars:
@ -13,14 +12,12 @@
sync_file_hosts: "{{ etcd_node_cert_hosts }}" sync_file_hosts: "{{ etcd_node_cert_hosts }}"
sync_file_is_cert: true sync_file_is_cert: true
with_items: "{{ etcd_node_cert_list|d([]) }}" with_items: "{{ etcd_node_cert_list|d([]) }}"
run_once: true
- name: sync_etcd_node_certs | Set facts for etcd sync_file results - name: sync_etcd_node_certs | Set facts for etcd sync_file results
set_fact: set_fact:
etcd_node_certs_needed: "{{ etcd_node_certs_needed|default([]) + [item.path] }}" etcd_node_certs_needed: "{{ etcd_node_certs_needed|default([]) + [item.path] }}"
with_items: "{{ sync_file_results|d([]) }}" with_items: "{{ sync_file_results|d([]) }}"
when: item.no_srcs|bool when: item.no_srcs|bool
run_once: true
- name: sync_etcd_node_certs | Unset sync_file_results after etcd node certs - name: sync_etcd_node_certs | Unset sync_file_results after etcd node certs
set_fact: set_fact:
@ -31,7 +28,6 @@
sync_file: ca.pem sync_file: ca.pem
sync_file_dir: "{{ etcd_cert_dir }}" sync_file_dir: "{{ etcd_cert_dir }}"
sync_file_hosts: "{{ etcd_node_cert_hosts }}" sync_file_hosts: "{{ etcd_node_cert_hosts }}"
run_once: true
- name: sync_etcd_node_certs | Unset sync_file_results after ca.pem - name: sync_etcd_node_certs | Unset sync_file_results after ca.pem
set_fact: set_fact: