|
@ -22,13 +22,14 @@ |
|
|
- ca.pem |
|
|
- ca.pem |
|
|
- node-{{ inventory_hostname }}-key.pem |
|
|
- node-{{ inventory_hostname }}-key.pem |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Check_certs | Set 'gen_certs' to true" |
|
|
- name: "Check_certs | Set 'gen_certs' to true" |
|
|
set_fact: |
|
|
set_fact: |
|
|
gen_certs: true |
|
|
gen_certs: true |
|
|
when: not item in etcdcert_master.files|map(attribute='path') | list |
|
|
when: not item in etcdcert_master.files|map(attribute='path') | list |
|
|
run_once: true |
|
|
run_once: true |
|
|
with_items: >- |
|
|
|
|
|
|
|
|
with_items: "{{ expected_files }}" |
|
|
|
|
|
vars: |
|
|
|
|
|
expected_files: >- |
|
|
['{{etcd_cert_dir}}/ca.pem', |
|
|
['{{etcd_cert_dir}}/ca.pem', |
|
|
{% set all_etcd_hosts = groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort %} |
|
|
{% set all_etcd_hosts = groups['k8s-cluster']|union(groups['etcd'])|union(groups['calico-rr']|default([]))|unique|sort %} |
|
|
{% for host in all_etcd_hosts %} |
|
|
{% for host in all_etcd_hosts %} |
|
@ -36,7 +37,6 @@ |
|
|
{% if not loop.last %}{{','}}{% endif %} |
|
|
{% if not loop.last %}{{','}}{% endif %} |
|
|
{% endfor %}] |
|
|
{% endfor %}] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Check_certs | Set 'gen_node_certs' to true" |
|
|
- name: "Check_certs | Set 'gen_node_certs' to true" |
|
|
set_fact: |
|
|
set_fact: |
|
|
gen_node_certs: |- |
|
|
gen_node_certs: |- |
|
|