diff options
author | wutianwei <wutianwei1@huawei.com> | 2017-09-07 17:28:47 +0800 |
---|---|---|
committer | wutianwei <wutianwei1@huawei.com> | 2017-09-07 17:28:47 +0800 |
commit | acab17c36763b7679a6d761f438412e591347902 (patch) | |
tree | a146ca53370ed55f97c0f337fd48bef45d2a89b5 /deploy/adapters | |
parent | 3bc3a8828c3ceefedd08e1767ae6e3bf2df9ac22 (diff) |
from controller node fetch os_cert
Change-Id: I2d1cbc6948d2cea1ccb852ed23033d5ddc6393e4
Signed-off-by: wutianwei <wutianwei1@huawei.com>
Diffstat (limited to 'deploy/adapters')
-rw-r--r-- | deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml | 4 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/post-openstack/tasks/main.yml | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml index 741c5bf1..e1efebfa 100644 --- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml +++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml @@ -69,7 +69,9 @@ tags: - odl -- hosts: utility_all[0] +- hosts: + - utility_all[0] + - network_hosts[0] remote_user: root roles: - post-openstack diff --git a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml index 4e2da1e0..7022a4b5 100644 --- a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml +++ b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml @@ -16,6 +16,7 @@ when: - public_net_info.enable == "True" - public_net_info.type == "flat" + - inventory_hostname == groups['utility_all'][0] - name: create external net shell: | @@ -27,6 +28,7 @@ when: - public_net_info.enable == "True" - public_net_info.type == "vlan" + - inventory_hostname == groups['utility_all'][0] - name: create external subnet shell: | @@ -37,6 +39,8 @@ --gateway "{{ public_net_info.external_gw }}" \ --subnet-range "{{ public_net_info.floating_ip_cidr }}" \ "{{ public_net_info.subnet }}" + when: + - inventory_hostname == groups['utility_all'][0] - name: create openstack flavors shell: | @@ -45,15 +49,22 @@ --id {{ item.id }} --ram {{ item.ram }} \ --disk {{ item.disk }} --vcpus {{ item.vcpus }} || true with_items: "{{ flavors }}" + when: + - inventory_hostname == groups['utility_all'][0] + - name: fetch openrc fetch: src: /root/openrc dest: /opt/openrc flat: "yes" + when: + - inventory_hostname == groups['utility_all'][0] - name: fetch haproxy.cert fetch: src: /etc/ssl/certs/haproxy.cert dest: /opt/os_cacert flat: "yes" + when: + - inventory_hostname == groups['network_hosts'][0] |