From 4f1f111621c55f1d234d18c59eac889bdc6772a4 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Tue, 18 Apr 2017 11:49:19 +0200 Subject: xci: Merge configure-targethosts.yml playbooks into one They are exactly same now after moving nfs to compute00. Change-Id: I9d9d2f037aa3684ba130ae0a4f9aef2e733f2d2e Signed-off-by: Fatih Degirmenci --- xci/file/ha/configure-targethosts.yml | 36 --------------------------------- xci/file/mini/configure-targethosts.yml | 36 --------------------------------- xci/file/noha/configure-targethosts.yml | 36 --------------------------------- xci/playbooks/configure-localhost.yml | 6 ------ xci/playbooks/configure-targethosts.yml | 36 +++++++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 114 deletions(-) delete mode 100644 xci/file/ha/configure-targethosts.yml delete mode 100644 xci/file/mini/configure-targethosts.yml delete mode 100644 xci/file/noha/configure-targethosts.yml create mode 100644 xci/playbooks/configure-targethosts.yml diff --git a/xci/file/ha/configure-targethosts.yml b/xci/file/ha/configure-targethosts.yml deleted file mode 100644 index 50da1f22..00000000 --- a/xci/file/ha/configure-targethosts.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- hosts: all - remote_user: root - tasks: - - name: add public key to host - copy: - src: ../file/authorized_keys - dest: /root/.ssh/authorized_keys - -- hosts: controller - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute00 - remote_user: root - # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros - roles: - - role: configure-nfs diff --git a/xci/file/mini/configure-targethosts.yml b/xci/file/mini/configure-targethosts.yml deleted file mode 100644 index 50da1f22..00000000 --- a/xci/file/mini/configure-targethosts.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- hosts: all - remote_user: root - tasks: - - name: add public key to host - copy: - src: ../file/authorized_keys - dest: /root/.ssh/authorized_keys - -- hosts: controller - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute00 - remote_user: root - # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros - roles: - - role: configure-nfs diff --git a/xci/file/noha/configure-targethosts.yml b/xci/file/noha/configure-targethosts.yml deleted file mode 100644 index 50da1f22..00000000 --- a/xci/file/noha/configure-targethosts.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- hosts: all - remote_user: root - tasks: - - name: add public key to host - copy: - src: ../file/authorized_keys - dest: /root/.ssh/authorized_keys - -- hosts: controller - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute - remote_user: root - vars_files: - - ../var/{{ ansible_os_family }}.yml - - ../var/flavor-vars.yml - roles: - # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros - - { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" } - # we need to force sync time with ntp or the nodes will be out of sync timewise - - role: synchronize-time - -- hosts: compute00 - remote_user: root - # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros - roles: - - role: configure-nfs diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml index 2a559645..34b974cd 100644 --- a/xci/playbooks/configure-localhost.yml +++ b/xci/playbooks/configure-localhost.yml @@ -21,12 +21,6 @@ path: "{{LOG_PATH}}" state: directory recurse: no - # when the deployment is not aio, we use playbook, configure-targethosts.yml, to configure all the hosts - - name: copy multihost playbook - copy: - src: "{{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/configure-targethosts.yml" - dest: "{{OPNFV_RELENG_PATH}}/prototypes/xci/playbooks" - when: XCI_FLAVOR != "aio" # when the deployment is aio, we overwrite and use playbook, configure-opnfvhost.yml, since everything gets installed on opnfv host - name: copy aio playbook copy: diff --git a/xci/playbooks/configure-targethosts.yml b/xci/playbooks/configure-targethosts.yml new file mode 100644 index 00000000..50da1f22 --- /dev/null +++ b/xci/playbooks/configure-targethosts.yml @@ -0,0 +1,36 @@ +--- +- hosts: all + remote_user: root + tasks: + - name: add public key to host + copy: + src: ../file/authorized_keys + dest: /root/.ssh/authorized_keys + +- hosts: controller + remote_user: root + vars_files: + - ../var/{{ ansible_os_family }}.yml + - ../var/flavor-vars.yml + roles: + # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros + - { role: configure-network, src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" } + # we need to force sync time with ntp or the nodes will be out of sync timewise + - role: synchronize-time + +- hosts: compute + remote_user: root + vars_files: + - ../var/{{ ansible_os_family }}.yml + - ../var/flavor-vars.yml + roles: + # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros + - { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" } + # we need to force sync time with ntp or the nodes will be out of sync timewise + - role: synchronize-time + +- hosts: compute00 + remote_user: root + # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros + roles: + - role: configure-nfs -- cgit 1.2.3-korg