xci: Add ansible files for sandbox mini flavor
[releng.git] / prototypes / xci / file / mini / 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     - name: configure modules
10       copy:
11         src: ../file/modules
12         dest: /etc/modules
13
14 - hosts: controller
15   remote_user: root
16   vars_files:
17     - ../var/{{ ansible_os_family }}.yml
18     - ../var/flavor-vars.yml
19   roles:
20     # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros
21     - { role: configure-network, when: ansible_distribution_release == "xenial", src: "../template/controller.interface.j2", dest: "/etc/network/interfaces" }
22
23 - hosts: compute
24   remote_user: root
25   vars_files:
26     - ../var/{{ ansible_os_family }}.yml
27     - ../var/flavor-vars.yml
28   roles:
29     # TODO: this only works for ubuntu/xenial and need to be adjusted for other distros
30     - { role: configure-network, when: ansible_distribution_release == "xenial", src: "../template/compute.interface.j2", dest: "/etc/network/interfaces" }
31   # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros
32     - role: configure-nfs