Browse Source

Set etcd facts necessary for etcd scaleup

hostvars such as etcd_ip are needed to add hosts to the cluster
Russell Teague 6 years ago
parent
commit
4c4cf8158d
1 changed files with 16 additions and 0 deletions
  1. 16 0
      playbooks/openshift-etcd/private/scaleup.yml

+ 16 - 0
playbooks/openshift-etcd/private/scaleup.yml

@@ -1,5 +1,21 @@
 ---
 - name: Configure etcd
+  hosts: oo_etcd_to_config
+  any_errors_fatal: true
+  tasks:
+  - fail:
+      msg: >
+        etcd stand-alone hosts on atomic is no longer supported. Please
+        co-locate your etcd hosts with masters.
+    when:
+    - openshift_is_atomic | bool
+    - not inventory_hostname in groups['oo_masters']
+
+  - import_role:
+      name: etcd
+      tasks_from: set_facts.yml
+
+- name: Configure etcd
   hosts: oo_new_etcd_to_config
   serial: 1
   any_errors_fatal: true