diff options
Diffstat (limited to 'deployment/noheat/infra-openstack/ansible/roles')
3 files changed, 12 insertions, 2 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 index 2a78e82e3..7fed57859 100644 --- 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 @@ -13,3 +13,13 @@ boot_from_volume: true terminate_volume: true volume_size: "{{ host.volume_size | default(10) }}" + register: new_host + +- name: Add host to inventory + add_host: + hostname: "{{ new_host.server.name }}" + groups: "{{ cluster.name }}" + ansible_ssh_host: "{{ new_host.server.public_v4 }}" + ansible_ssh_user: "{{ image.user }}" + ansible_ssh_extra_args: "-o StrictHostKeyChecking=no" + ansible_ssh_private_key_file: "~/.ssh/{{ keypair.key.name }}" 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 731bca04f..f8a64cbef 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: "{{ hosts }}" + loop: "{{ cluster.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 5ce130d44..a27e6a27b 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: "{{ hosts }}" + loop: "{{ cluster.hosts }}" |