blob: d8067d0955a18e500629f93825e618e7ca39af01 [file] [log] [blame]
David K. Bainbridgeed101542016-05-18 20:26:15 -07001- name: Ensure MAAS Ansible Config Directory
2 become: yes
3 file:
4 path=/etc/maas/ansible
5 owner=maas
6 group=maas
7 state=directory
David K. Bainbridge5ba01a92016-08-16 14:58:31 -07008 mode=0755
David K. Bainbridgeed101542016-05-18 20:26:15 -07009
David K. Bainbridge5ba01a92016-08-16 14:58:31 -070010- name: Ensure Ansible Roles
David K. Bainbridgeed101542016-05-18 20:26:15 -070011 become: yes
David K. Bainbridge5ba01a92016-08-16 14:58:31 -070012 copy:
13 src: roles
14 dest: /etc/maas/ansible
15 owner: maas
16 group: maas
17 mode: u=rwX,g=rX,o=rX
18 force: true
David K. Bainbridgeed101542016-05-18 20:26:15 -070019
David K. Bainbridge5ba01a92016-08-16 14:58:31 -070020- name: Ensure Role Permissions and Modes
David K. Bainbridgee18f57b2016-05-23 15:40:58 -070021 become: yes
David K. Bainbridge5ba01a92016-08-16 14:58:31 -070022 file:
23 path: /etc/maas/ansible
24 owner: maas
25 group: maas
26 mode: u=rwX,g=rX,o=rX
27 state: directory
28 recurse: true
David K. Bainbridgeed101542016-05-18 20:26:15 -070029
David K. Bainbridge0820cab2016-06-02 17:43:32 -070030- name: Ensure Ansible Provisioning Script
31 become: yes
32 copy:
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070033 dest=/etc/maas/ansible/{{ item }}
34 src=files/{{ item }}
David K. Bainbridge0820cab2016-06-02 17:43:32 -070035 owner=maas
36 group=maas
37 mode=0755
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070038 with_items:
39 - do-ansible
40 - do-switch
David K. Bainbridge0820cab2016-06-02 17:43:32 -070041
42- name: Ensure Provisioning Log Directory
43 become: yes
44 file:
45 path=/etc/maas/ansible/logs
46 state=directory
47 owner=maas
48 group=maas
49 mode=0755
50
David K. Bainbridge915105d2016-07-06 14:10:08 -070051- name: Capture MAAS API Key
52 become: yes
53 command: maas-region-admin apikey --username={{ maas.user }}
54 register: apikey
55 changed_when: false
56
Charles Chan3c681622016-08-03 21:53:03 -070057- name: Ensure Compute and Switch Node Playbooks
David K. Bainbridgeed101542016-05-18 20:26:15 -070058 become: yes
David K. Bainbridge10b0c112016-05-24 13:17:23 -070059 template:
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070060 src=files/{{ item }}
61 dest=/etc/maas/ansible/{{ item }}
David K. Bainbridgeed101542016-05-18 20:26:15 -070062 owner=maas
63 group=maas
64 mode=0644
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -070065 with_items:
66 - compute-node.yml
67 - switch-node.yml
Charles Chan3c681622016-08-03 21:53:03 -070068
69- name: Ensure Connect Switch Ansible Playbook
70 become: yes
71 copy:
72 dest=/etc/maas/ansible/{{ item }}
73 src=files/{{ item }}
74 owner=maas
75 group=maas
76 mode=0644
77 with_items:
Charles Chana4ccbde2016-08-02 00:12:34 -070078 - connect-switch.yml
David K. Bainbridge915105d2016-07-06 14:10:08 -070079
80- name: Ensure Dynamic Inventory Script
81 become: yes
82 template:
83 src=files/pod-inventory
84 dest=/etc/maas/ansible/pod-inventory
85 owner=maas
86 group=maas
87 mode=0755