Add support for shared ansible_host in inventory
Today it is possible to create the following ansible inventory file:
[foo]
foo01 ansible_host=192.168.1.1
[bar]
bar01 ansible_host=192.168.1.1
Which allows a user to create multiple host aliases for a single
connection. This could be done with ansible groups, however there is
some functional differences on how ansible runs in that configuration.
We could also request 2 nodes from nodepool, however in this case, it
would be a waste of CI resources because every alias would need a new
node from nodepool.
Now, a user is able to alias multiple host names to a single node from
nodepool by doing the following:
nodeset:
nodes:
- name:
- foo
- bar
label: ubuntu-xenial
This would result in a single node request from nodepool, but create
an inventory file with 2 alaises sharing and single ansible_host
variable.
Change-Id: I674d6baac26852ee1503feb1ed16c279bf773688
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/doc/source/user/config.rst b/doc/source/user/config.rst
index fa874a9..edd3222 100644
--- a/doc/source/user/config.rst
+++ b/doc/source/user/config.rst
@@ -1201,7 +1201,9 @@
label: controller-label
- name: compute1
label: compute-label
- - name: compute2
+ - name:
+ - compute2
+ - web
label: compute-label
groups:
- name: ceph-osd
@@ -1212,6 +1214,9 @@
- controller
- compute1
- compute2
+ - name: ceph-web
+ nodes:
+ - web
.. attr:: nodeset
@@ -1233,6 +1238,9 @@
The name of the node. This will appear in the Ansible inventory
for the job.
+ This can also be as a list of strings. If so, then the list of hosts in
+ the Ansible inventory will share a common ansible_host address.
+
.. attr:: label
:required: