summaryrefslogtreecommitdiffstats
path: root/xci/file/mini/configure-targethosts.yml
blob: 395f44a64c59044dc2ffba41b2369a8fac1a3dff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- 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" }
  # TODO: this role is for configuring NFS on xenial and adjustment needed for other distros
    - role: configure-nfs