From dac08cfb4a329f0d557aec1b859aa5d159d55c09 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 29 Mar 2017 15:43:00 +0200 Subject: xci: Add ansible files for sandbox ha flavor This patch adds noha target host configuration playbook, inventory, variable files and so on to use until we have time to fix things more properly and some other functionality becomes available in upstream. This approach will result in duplicates but it is something we can perhaps live with. The playbook to configure target hosts will be same with the one we will have for noha flavor but for different for the flavor mini. The user variables and openstack user configuration will be different between flavors and keeping deployment specific configuration. Change-Id: I4e2b375b9f8f6bd5f8c5da91a522b78d61a58125 Signed-off-by: Fatih Degirmenci --- prototypes/xci/file/ha/configure-targethosts.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 prototypes/xci/file/ha/configure-targethosts.yml (limited to 'prototypes/xci/file/ha/configure-targethosts.yml') diff --git a/prototypes/xci/file/ha/configure-targethosts.yml b/prototypes/xci/file/ha/configure-targethosts.yml new file mode 100644 index 000000000..6dc147f3b --- /dev/null +++ b/prototypes/xci/file/ha/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 + - name: configure modules + copy: + src: ../file/modules + dest: /etc/modules + +- 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, when: ansible_distribution_release == "xenial", src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" } + +- 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, when: ansible_distribution_release == "xenial", src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" } + +- hosts: compute01 + 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