summaryrefslogtreecommitdiffstats
path: root/prototypes/xci/file/ha/configure-targethosts.yml
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-03-29 15:43:00 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-03-31 08:06:55 +0000
commitdac08cfb4a329f0d557aec1b859aa5d159d55c09 (patch)
tree6aedead2d98799711e46b02e78c5cf397adddc84 /prototypes/xci/file/ha/configure-targethosts.yml
parent3f4c567e9653da19df355f0dfd2e32328baca41f (diff)
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 <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'prototypes/xci/file/ha/configure-targethosts.yml')
-rw-r--r--prototypes/xci/file/ha/configure-targethosts.yml36
1 files changed, 36 insertions, 0 deletions
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