summaryrefslogtreecommitdiffstats
path: root/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/register_instances.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/register_instances.yml')
-rw-r--r--tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/register_instances.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/register_instances.yml b/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/register_instances.yml
new file mode 100644
index 00000000..a50ecd22
--- /dev/null
+++ b/tools/cicdansible/roles/setup_openstack_infrastructure/tasks/deploy/register_instances.yml
@@ -0,0 +1,9 @@
+#Register instances as hosts in inventory.
+#Installer and infra are statically registered.
+#Register node instances dynamically.
+- name: "Register node instances"
+ add_host:
+ name: "node{{ item[0] }}"
+ groups: nodes
+ ansible_host: "{{ item[1] }}"
+ loop: "{{ query('indexed_items', (heat_stack.stack.outputs | selectattr('output_key', 'equalto', 'node_ips') | list).0.output_value) }}"