summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/common/openshift-cluster/openshift_hosted.yml2
-rw-r--r--playbooks/common/openshift-master/restart_hosts.yml3
-rw-r--r--roles/etcd_server_certificates/tasks/main.yml32
3 files changed, 35 insertions, 2 deletions
diff --git a/playbooks/common/openshift-cluster/openshift_hosted.yml b/playbooks/common/openshift-cluster/openshift_hosted.yml
index 021d19dad..34f1a979b 100644
--- a/playbooks/common/openshift-cluster/openshift_hosted.yml
+++ b/playbooks/common/openshift-cluster/openshift_hosted.yml
@@ -55,4 +55,4 @@
- include_role:
name: openshift_hosted_logging
tasks_from: update_master_config
- when: openshift_hosted_logging_deploy | default(false) | boola
+ when: openshift_hosted_logging_deploy | default(false) | bool
diff --git a/playbooks/common/openshift-master/restart_hosts.yml b/playbooks/common/openshift-master/restart_hosts.yml
index 832301e3d..475144dbf 100644
--- a/playbooks/common/openshift-master/restart_hosts.yml
+++ b/playbooks/common/openshift-master/restart_hosts.yml
@@ -10,9 +10,10 @@
- name: Wait for master to restart
local_action:
module: wait_for
- host="{{ inventory_hostname }}"
+ host="{{ ansible_host }}"
state=started
delay=10
+ timeout=600
become: no
# Now that ssh is back up we can wait for API on the remote system,
diff --git a/roles/etcd_server_certificates/tasks/main.yml b/roles/etcd_server_certificates/tasks/main.yml
index b0fd117ed..1acdf1c85 100644
--- a/roles/etcd_server_certificates/tasks/main.yml
+++ b/roles/etcd_server_certificates/tasks/main.yml
@@ -142,6 +142,38 @@
dest: "{{ etcd_cert_config_dir }}"
when: etcd_server_certs_missing | bool
+- name: Create a tarball of the etcd ca certs
+ command: >
+ tar -czvf {{ etcd_generated_certs_dir }}/{{ etcd_ca_name }}.tgz
+ -C {{ etcd_ca_dir }} .
+ args:
+ creates: "{{ etcd_generated_certs_dir }}/{{ etcd_ca_name }}.tgz"
+ warn: no
+ when: etcd_server_certs_missing | bool
+ delegate_to: "{{ etcd_ca_host }}"
+
+- name: Retrieve etcd ca cert tarball
+ fetch:
+ src: "{{ etcd_generated_certs_dir }}/{{ etcd_ca_name }}.tgz"
+ dest: "{{ g_etcd_server_mktemp.stdout }}/"
+ flat: yes
+ fail_on_missing: yes
+ validate_checksum: yes
+ when: etcd_server_certs_missing | bool
+ delegate_to: "{{ etcd_ca_host }}"
+
+- name: Ensure ca directory exists
+ file:
+ path: "{{ etcd_ca_dir }}"
+ state: directory
+ when: etcd_server_certs_missing | bool
+
+- name: Unarchive etcd ca cert tarballs
+ unarchive:
+ src: "{{ g_etcd_server_mktemp.stdout }}/{{ etcd_ca_name }}.tgz"
+ dest: "{{ etcd_ca_dir }}"
+ when: etcd_server_certs_missing | bool
+
- name: Delete temporary directory
file: name={{ g_etcd_server_mktemp.stdout }} state=absent
become: no