|
|
@ -80,6 +80,7 @@ |
|
|
|
shell: "tar cfz - -C {{ kube_cert_dir }} -T /dev/stdin <<< {{ my_master_certs|join(' ') }} {{ all_node_certs|join(' ') }} | base64 --wrap=0" |
|
|
|
args: |
|
|
|
executable: /bin/bash |
|
|
|
no_log: true |
|
|
|
register: master_cert_data |
|
|
|
check_mode: no |
|
|
|
delegate_to: "{{groups['kube-master'][0]}}" |
|
|
@ -90,6 +91,7 @@ |
|
|
|
shell: "tar cfz - -C {{ kube_cert_dir }} -T /dev/stdin <<< {{ my_node_certs|join(' ') }} | base64 --wrap=0" |
|
|
|
args: |
|
|
|
executable: /bin/bash |
|
|
|
no_log: true |
|
|
|
register: node_cert_data |
|
|
|
check_mode: no |
|
|
|
delegate_to: "{{groups['kube-master'][0]}}" |
|
|
@ -116,6 +118,7 @@ |
|
|
|
|
|
|
|
- name: Gen_certs | Unpack certs on masters |
|
|
|
shell: "base64 -d < {{ cert_tempfile.stdout }} | tar xz -C {{ kube_cert_dir }}" |
|
|
|
no_log: true |
|
|
|
changed_when: false |
|
|
|
check_mode: no |
|
|
|
when: inventory_hostname in groups['kube-master'] and sync_certs|default(false) and |
|
|
@ -133,6 +136,7 @@ |
|
|
|
shell: "base64 -d <<< '{{node_cert_data.stdout|quote}}' | tar xz -C {{ kube_cert_dir }}" |
|
|
|
args: |
|
|
|
executable: /bin/bash |
|
|
|
no_log: true |
|
|
|
changed_when: false |
|
|
|
check_mode: no |
|
|
|
when: inventory_hostname in groups['kube-node'] and |
|
|
|