Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force bastion-ansible.sh to be run after replacing an infra node #383

Open
ioggstream opened this issue Aug 11, 2017 · 0 comments
Open

force bastion-ansible.sh to be run after replacing an infra node #383

ioggstream opened this issue Aug 11, 2017 · 0 comments

Comments

@ioggstream
Copy link
Contributor

when

  • I replace an infra node

I expect

bastion-ansible.sh to be run

instead

it is not run

idea

injecting infra host-id into node.yaml:run_ansible I can notify if an infra node have been replaced.

This will trigger bastion-ansible.sh / ansible-playbook main.yaml that will reconfigure the node.

Do you see any drawback?

diff --git a/node.yaml b/node.yaml
index 91fb064..4c20b55 100644
--- a/node.yaml
+++ b/node.yaml
@@ -419,6 +419,10 @@ parameters:
     type: boolean
     description: Enable http authentication or use another backend via extra_openshift_ansible_params.
     default: true
+
+  all_infra_ids:
+    type: string
+    description: A list of server ids

 conditions:
   root_volume: false
@@ -834,6 +838,8 @@ resources:
           default: {get_param: internal_subnet}
         - name: fixed_subnet
           default: {get_param: fixed_subnet}
+        - name: all_infra_ids
+          default: {get_param: all_infra_ids}
       outputs:
         - name: ca_cert
         - name: ca_key
diff --git a/openshift.yaml b/openshift.yaml
index ba8c6c8..b9ba120 100644
--- a/openshift.yaml
+++ b/openshift.yaml
@@ -893,6 +893,10 @@ resources:
             list_join:
               - " "
               - {get_attr: [openshift_infra_nodes, hostname]}
+          all_infra_ids:
+            list_join:
+              - " "
+              - {get_attr: [openshift_infra_nodes, host]}
           container_quota: {get_param: container_quota}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant