David K. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 1 | - 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. Bainbridge | 5183ea1 | 2016-08-16 14:58:31 -0700 | [diff] [blame^] | 8 | mode=0755 |
David K. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 9 | |
David K. Bainbridge | 5183ea1 | 2016-08-16 14:58:31 -0700 | [diff] [blame^] | 10 | - name: Ensure Ansible Roles |
David K. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 11 | become: yes |
David K. Bainbridge | 5183ea1 | 2016-08-16 14:58:31 -0700 | [diff] [blame^] | 12 | 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. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 19 | |
David K. Bainbridge | 5183ea1 | 2016-08-16 14:58:31 -0700 | [diff] [blame^] | 20 | - name: Ensure Role Permissions and Modes |
David K. Bainbridge | e18f57b | 2016-05-23 15:40:58 -0700 | [diff] [blame] | 21 | become: yes |
David K. Bainbridge | 5183ea1 | 2016-08-16 14:58:31 -0700 | [diff] [blame^] | 22 | 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. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 29 | |
David K. Bainbridge | 0820cab | 2016-06-02 17:43:32 -0700 | [diff] [blame] | 30 | - name: Ensure Ansible Provisioning Script |
| 31 | become: yes |
| 32 | copy: |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 33 | dest=/etc/maas/ansible/{{ item }} |
| 34 | src=files/{{ item }} |
David K. Bainbridge | 0820cab | 2016-06-02 17:43:32 -0700 | [diff] [blame] | 35 | owner=maas |
| 36 | group=maas |
| 37 | mode=0755 |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 38 | with_items: |
| 39 | - do-ansible |
| 40 | - do-switch |
David K. Bainbridge | 0820cab | 2016-06-02 17:43:32 -0700 | [diff] [blame] | 41 | |
| 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. Bainbridge | 915105d | 2016-07-06 14:10:08 -0700 | [diff] [blame] | 51 | - 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 Chan | 911e75d | 2016-08-03 21:53:03 -0700 | [diff] [blame] | 57 | - name: Ensure Compute and Switch Node Playbooks |
David K. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 58 | become: yes |
David K. Bainbridge | 10b0c11 | 2016-05-24 13:17:23 -0700 | [diff] [blame] | 59 | template: |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 60 | src=files/{{ item }} |
| 61 | dest=/etc/maas/ansible/{{ item }} |
David K. Bainbridge | ed10154 | 2016-05-18 20:26:15 -0700 | [diff] [blame] | 62 | owner=maas |
| 63 | group=maas |
| 64 | mode=0644 |
David K. Bainbridge | be58a0d | 2016-06-22 15:43:02 -0700 | [diff] [blame] | 65 | with_items: |
| 66 | - compute-node.yml |
| 67 | - switch-node.yml |
Charles Chan | 911e75d | 2016-08-03 21:53:03 -0700 | [diff] [blame] | 68 | |
| 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 Chan | f35d4b8 | 2016-08-02 00:12:34 -0700 | [diff] [blame] | 78 | - connect-switch.yml |
David K. Bainbridge | 915105d | 2016-07-06 14:10:08 -0700 | [diff] [blame] | 79 | |
| 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 |