diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2020-06-16 12:05:14 +0200 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-07-30 09:03:11 +0000 |
commit | cbc0bf009dc59c483c88ce32a50c016874cd5363 (patch) | |
tree | 0fe5634bc0dc230a03d3e860267c9c3cd09b5c7f /deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts | |
parent | a879e2a54e0641b692202d417021f1824032b123 (diff) |
Add Ansible roles for OpenStack hosts
Key pair is generated upon host creation and removed after the host is
destroyed.
This patch is based on previous work by:
Krzysztof Opasiak <k.opasiak@samsung.com>
Issue-ID: INT-1601
Change-Id: I9acd0b68a3ee79a0d710c40e0a1cc8470dfacce5
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts')
2 files changed, 13 insertions, 0 deletions
diff --git a/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/create_host.yml b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/create_host.yml new file mode 100644 index 000000000..847150f36 --- /dev/null +++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/create_host.yml @@ -0,0 +1,9 @@ +--- +- name: Create host + os_server: + state: present + name: "{{ host.name }}" + image: "{{ host.image }}" + flavor: "{{ host.flavor }}" + key_name: "{{ host.keypair }}" + network: "{{ host.network }}" 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 new file mode 100644 index 000000000..f79314c72 --- /dev/null +++ b/deployment/noheat/infra-openstack/ansible/roles/openstack/create_devstack_hosts/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- include: create_host.yml host={{ item }} + with_items: + - "{{ hosts }}" |