From ed760541eb52cf211bda363a63f2da07becd94c8 Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Fri, 29 Jan 2021 11:06:16 +0100 Subject: Accept host group as an argument to allow reusing roles Issue-ID: INT-1601 Change-Id: I358332725272c44535257648c7fbccaf94d2ac30 Signed-off-by: Pawel Wieczorek --- deployment/noheat/infra-openstack/ansible/create.yml | 3 ++- deployment/noheat/infra-openstack/ansible/destroy.yml | 3 ++- .../ansible/roles/openstack/create_devstack_hosts/tasks/main.yml | 2 +- .../ansible/roles/openstack/destroy_devstack_hosts/tasks/main.yml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'deployment/noheat') 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 }}" -- cgit 1.2.3-korg