xci: Fix network configuration
[releng.git] / prototypes / xci / file / ha / configure-targethosts.yml
1 ---
2 - hosts: all
3   remote_user: root
4   tasks:
5     - name: add public key to host
6       copy:
7         src: ../file/authorized_keys
8         dest: /root/.ssh/authorized_keys
9
10 - hosts: controller
11   remote_user: root
12   vars_files:
13     - ../var/{{ ansible_os_family }}.yml
14     - ../var/flavor-vars.yml
15   roles:
16     # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros
17     - { role: configure-network, src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" }
18
19 - hosts: compute
20   remote_user: root
21   vars_files:
22     - ../var/{{ ansible_os_family }}.yml
23     - ../var/flavor-vars.yml
24   roles:
25     # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros
26     - { role: configure-network, src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" }
27
28 - hosts: compute01
29   remote_user: root
30   # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros
31   roles:
32     - role: configure-nfs