summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/evaluate_groups.yml2
-rw-r--r--playbooks/common/openshift-etcd/config.yml28
-rw-r--r--playbooks/common/openshift-node/config.yml1
3 files changed, 28 insertions, 3 deletions
diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml
index db7105ed5..7917bfba5 100644
--- a/playbooks/common/openshift-cluster/evaluate_groups.yml
+++ b/playbooks/common/openshift-cluster/evaluate_groups.yml
@@ -47,7 +47,7 @@
# Use g_new_node_hosts if it exists otherwise g_node_hosts
- set_fact:
- g_node_hosts_to_config: "{{ g_new_node_hosts | default(g_node_hosts | default([])) }}"
+ g_node_hosts_to_config: "{{ g_new_node_hosts | default(g_node_hosts | default([], true), true) }}"
- name: Evaluate oo_nodes_to_config
add_host:
diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml
index d23a54511..93eb157cb 100644
--- a/playbooks/common/openshift-etcd/config.yml
+++ b/playbooks/common/openshift-etcd/config.yml
@@ -69,8 +69,32 @@
validate_checksum: yes
with_items: etcd_needing_server_certs
-- name: Configure etcd hosts
- hosts: oo_etcd_to_config
+# Configure a first etcd host to avoid conflicts in choosing a leader
+# if other members come online too quickly.
+- name: Configure first etcd host
+ hosts: oo_first_etcd
+ vars:
+ sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}"
+ etcd_url_scheme: https
+ etcd_peer_url_scheme: https
+ etcd_peers_group: oo_etcd_to_config
+ pre_tasks:
+ - name: Ensure certificate directory exists
+ file:
+ path: "{{ etcd_cert_config_dir }}"
+ state: directory
+ - name: Unarchive the tarball on the etcd host
+ unarchive:
+ src: "{{ sync_tmpdir }}/{{ etcd_cert_subdir }}.tgz"
+ dest: "{{ etcd_cert_config_dir }}"
+ when: etcd_server_certs_missing
+ roles:
+ - etcd
+ - role: nickhammond.logrotate
+
+# Configure the remaining etcd hosts, skipping the first one we dealt with above.
+- name: Configure remaining etcd hosts
+ hosts: oo_etcd_to_config:!oo_first_etcd
vars:
sync_tmpdir: "{{ hostvars.localhost.g_etcd_mktemp.stdout }}"
etcd_url_scheme: https
diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml
index 81ec9ab6d..e07de0e99 100644
--- a/playbooks/common/openshift-node/config.yml
+++ b/playbooks/common/openshift-node/config.yml
@@ -80,6 +80,7 @@
when: etcd_client_flannel_certs_missing is defined and etcd_client_flannel_certs_missing
roles:
- role: etcd_certificates
+ when: openshift_use_flannel | default(false) | bool
post_tasks:
- name: Create a tarball of the etcd flannel certs
command: >