diff options
author | Markos Chandras <mchandras@suse.de> | 2018-03-16 11:45:14 +0000 |
---|---|---|
committer | Fatih Degirmenci <fdegir@gmail.com> | 2018-03-17 10:03:07 +0100 |
commit | b06d66afead6e09a0641b4152d9388b20e45feb0 (patch) | |
tree | 15cc92c43e9ca323eca01a1888316a61cddb67c4 /xci/installer/osa/playbooks/configure-targethosts.yml | |
parent | 262b2a6e16be8abe06edac377094bcbaa84da378 (diff) |
xci: osa: Simplify OpenStack host playbooks
The configure-targethost playbook is configuring all the OSA hosts so
we can simplify all that by introducing a new 'openstack' host group
with the controller and the compute nodes and configure all of them
in parallel.
Change-Id: I21f8709e7649b041575dab45fc4e070aa01e0a6f
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/installer/osa/playbooks/configure-targethosts.yml')
-rw-r--r-- | xci/installer/osa/playbooks/configure-targethosts.yml | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/xci/installer/osa/playbooks/configure-targethosts.yml b/xci/installer/osa/playbooks/configure-targethosts.yml index ad8bafc9..31c3e02e 100644 --- a/xci/installer/osa/playbooks/configure-targethosts.yml +++ b/xci/installer/osa/playbooks/configure-targethosts.yml @@ -1,18 +1,5 @@ --- -- hosts: all - remote_user: root - tasks: - - name: add public key to host - copy: - src: "{{ XCI_PATH }}/xci/files/authorized_keys" - dest: /root/.ssh/authorized_keys - - - name: fetch xci environment - copy: - src: "{{ XCI_PATH }}/.cache/xci.env" - dest: /root/xci.env - -- hosts: controller +- hosts: openstack remote_user: root vars_files: - "{{ XCI_PATH }}/xci/var/opnfv.yml" @@ -26,25 +13,15 @@ - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml" roles: - role: bootstrap-host - -- hosts: compute - remote_user: root - vars_files: - - "{{ XCI_PATH }}/xci/var/opnfv.yml" - - pre_tasks: - - name: Load distribution variables - include_vars: - file: "{{ item }}" - with_items: - - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml" - - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml" - roles: - - role: bootstrap-host - - role: configure-ceph - when: XCI_CEPH_ENABLED == "true" - -- hosts: compute00 - remote_user: root - roles: - role: configure-nfs + when: + - "'compute' in group_names" + - role: configure-ceph + when: + - XCI_CEPH_ENABLED == "true" + - "'compute' in group_names" + tasks: + - name: add public key to host + copy: + src: "{{ XCI_PATH }}/xci/files/authorized_keys" + dest: /root/.ssh/authorized_keys |