blob: c76dadd68e146e45b32d74761fc8adafea666eba [file] [log] [blame]
---
- name: Ensure Ansible Directories
become: yes
file:
path=/etc/maas/ansible/{{ item }}
state=directory
owner=maas
group=maas
mode=0755
with_items:
- roles
- vars
- library
- name: Ensure XOS Cluster Enlist Script
become: yes
template:
src=files/do-enlist-compute-node
dest=/etc/maas/ansible/do-enlist-compute-node
owner=maas
group=maas
mode=0755
- name: Copy Compute Node Playbook
become: yes
copy:
src=../../../cord-compute-playbook.yml
dest=/etc/maas/ansible
owner=maas
group=maas
mode=0644
- name: Copy Required Ansible Libraries
become: yes
copy:
src=../../../library/{{ item }}
dest=/etc/maas/ansible/library
owner=maas
group=maas
mode=0644
with_items:
- juju_facts.py
- name: Copy Required Ansible Roles
become: yes
copy:
src=../../../roles/{{ item }}
dest=/etc/maas/ansible/roles
owner=maas
group=maas
mode=0755
with_items:
- common-prep
- cloudlab-prep
- compute-prep
- dns-configure
- head-prep
- juju-compute-setup
- xos-compute-setup
- maas-simulate-fabric
- maas-test-client-install
- name: Copy Required Ansible Variables
become: yes
copy:
src=../../../vars/{{ item }}
dest=/etc/maas/ansible/vars
owner=maas
group=maas
mode=0644
with_items:
- cord_defaults.yml
- cord.yml
- example_keystone.yml
- name: Store cord_in_a_box value for compute node provisioning
become: yes
lineinfile: "dest=/etc/maas/ansible/vars/cord.yml state=present regexp='^cord_in_a_box' line='cord_in_a_box: True'"
when: cord_in_a_box
- name: Ensure JuJu and XOS Compute Node Provisioning
become: yes
lineinfile:
dest=/etc/maas/ansible/do-ansible
line='/etc/maas/ansible/do-enlist-compute-node $ID $HOSTNAME || exit $?'