diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2021-01-29 11:06:16 +0100 |
---|---|---|
committer | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2021-01-29 11:06:22 +0100 |
commit | ed760541eb52cf211bda363a63f2da07becd94c8 (patch) | |
tree | 09a3ece2ab0dfa6cef605878e6c8b9fa5e58d757 | |
parent | a9ee3248101eef2287315d300fbb7c5e36d0670e (diff) |
Accept host group as an argument to allow reusing roles
Issue-ID: INT-1601
Change-Id: I358332725272c44535257648c7fbccaf94d2ac30
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
4 files changed, 6 insertions, 4 deletions
diff --git a/deployment/noheat/infra-openstack/ansible/create.yml b/deployment/noheat/infra-openstack/ansible/create.yml index 3885f0e2c..2b7cf6366 100644 --- a/deployment/noheat/infra-openstack/ansible/create.yml +++ b/deployment/noheat/infra-openstack/ansible/create.yml @@ -7,7 +7,8 @@ - openstack/create_devstack_network - openstack/create_devstack_securitygroup - openstack/create_devstack_keypair - - openstack/create_devstack_hosts + - role: openstack/create_devstack_hosts + hosts: "{{ cluster.hosts }}" - name: Create cluster operator access keypair hosts: "operator0" gather_facts: False diff --git a/deployment/noheat/infra-openstack/ansible/destroy.yml b/deployment/noheat/infra-openstack/ansible/destroy.yml index 6091e597d..c85f17a02 100644 --- a/deployment/noheat/infra-openstack/ansible/destroy.yml +++ b/deployment/noheat/infra-openstack/ansible/destroy.yml @@ -4,7 +4,8 @@ connection: local gather_facts: False roles: - - openstack/destroy_devstack_hosts + - role: openstack/destroy_devstack_hosts + hosts: "{{ cluster.hosts }}" - openstack/destroy_devstack_keypair - openstack/destroy_devstack_network - openstack/destroy_devstack_securitygroup diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml index f8a64cbef..731bca04f 100644 --- a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml +++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml @@ -1,3 +1,3 @@ --- - include: create_host.yml host={{ item }} - loop: "{{ cluster.hosts }}" + loop: "{{ hosts }}" diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml index a27e6a27b..5ce130d44 100644 --- a/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml +++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml @@ -1,3 +1,3 @@ --- - include: destroy_host.yml host={{ item }} - loop: "{{ cluster.hosts }}" + loop: "{{ hosts }}" |