blob: cbd37d68d8e95403b3a5bf7d1d357036683ec17a [file] [log] [blame]
David K. Bainbridgee05b5562016-07-08 11:07:33 -07001---
2- name: Ensure Ansible Directories
3 become: yes
4 file:
5 path=/etc/maas/ansible/{{ item }}
6 state=directory
7 owner=maas
8 group=maas
9 mode=0755
10 with_items:
11 - roles
12 - vars
13 - library
14
15- name: Ensure XOS Cluster Enlist Script
16 become: yes
17 template:
Scott Baker86b64152016-11-02 09:06:53 -070018 src=do-enlist-compute-node
David K. Bainbridgee05b5562016-07-08 11:07:33 -070019 dest=/etc/maas/ansible/do-enlist-compute-node
20 owner=maas
21 group=maas
22 mode=0755
23
24- name: Copy Compute Node Playbook
25 become: yes
26 copy:
27 src=../../../cord-compute-playbook.yml
28 dest=/etc/maas/ansible
29 owner=maas
30 group=maas
31 mode=0644
32
33- name: Copy Required Ansible Libraries
34 become: yes
35 copy:
36 src=../../../library/{{ item }}
37 dest=/etc/maas/ansible/library
38 owner=maas
39 group=maas
40 mode=0644
41 with_items:
42 - juju_facts.py
43
44- name: Copy Required Ansible Roles
45 become: yes
46 copy:
47 src=../../../roles/{{ item }}
48 dest=/etc/maas/ansible/roles
49 owner=maas
50 group=maas
51 mode=0755
52 with_items:
53 - common-prep
54 - cloudlab-prep
55 - compute-prep
56 - dns-configure
57 - head-prep
58 - juju-compute-setup
59 - xos-compute-setup
60
61- name: Copy Required Ansible Variables
62 become: yes
63 copy:
64 src=../../../vars/{{ item }}
65 dest=/etc/maas/ansible/vars
66 owner=maas
67 group=maas
68 mode=0644
69 with_items:
70 - cord_defaults.yml
71 - cord.yml
72 - example_keystone.yml
73
Andy Bavier30d27c92016-09-15 15:59:17 -040074- name: Store cord_in_a_box value for compute node provisioning
75 become: yes
76 lineinfile: "dest=/etc/maas/ansible/vars/cord.yml state=present regexp='^cord_in_a_box' line='cord_in_a_box: True'"
77 when: cord_in_a_box
78
David K. Bainbridgee05b5562016-07-08 11:07:33 -070079- name: Ensure JuJu and XOS Compute Node Provisioning
80 become: yes
81 lineinfile:
82 dest=/etc/maas/ansible/do-ansible
83 line='/etc/maas/ansible/do-enlist-compute-node $ID $HOSTNAME || exit $?'