Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 1 | --- |
| 2 | # file: roles/compute-prep/tasks/main.yml |
| 3 | |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 4 | - name: Install packages |
Zack Williams | b2b8c7b | 2016-03-10 12:47:18 -0700 | [diff] [blame] | 5 | apt: |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 6 | name: "{{ item }}" |
| 7 | state: present |
| 8 | update_cache: yes |
| 9 | cache_valid_time: 3600 |
Zack Williams | 8625d04 | 2016-02-26 14:32:43 -0700 | [diff] [blame] | 10 | with_items: |
| 11 | - python-yaml |
| 12 | |
Andy Bavier | 3a1d064 | 2016-07-01 14:11:39 -0400 | [diff] [blame] | 13 | - name: Add ubuntu user |
| 14 | user: |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 15 | name: ubuntu |
| 16 | groups: adm |
Andy Bavier | 3a1d064 | 2016-07-01 14:11:39 -0400 | [diff] [blame] | 17 | |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 18 | - name: Add head node ubuntu user key |
| 19 | authorized_key: |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 20 | user: ubuntu |
| 21 | key: "{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}" |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 22 | |
Andy Bavier | 3a1d064 | 2016-07-01 14:11:39 -0400 | [diff] [blame] | 23 | - name: Add head node root user key |
| 24 | authorized_key: |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 25 | user: root |
| 26 | key: "{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}" |
Andy Bavier | 3a1d064 | 2016-07-01 14:11:39 -0400 | [diff] [blame] | 27 | |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 28 | - name: Add route via /etc/rc.local |
Zack Williams | 6f5a6e7 | 2016-08-10 17:45:27 -0700 | [diff] [blame] | 29 | when: not on_maas |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 30 | template: |
| 31 | src=rc.local.j2 |
| 32 | dest=/etc/rc.local |
| 33 | mode=0755 |
| 34 | notify: |
| 35 | - run rc.local |
| 36 | |
| 37 | - name: Create /var/lib/nova dir |
| 38 | file: |
| 39 | path=/var/lib/nova |
| 40 | state=directory |
Andy Bavier | 30d27c9 | 2016-09-15 15:59:17 -0400 | [diff] [blame] | 41 | |
| 42 | - name: Remove superfluous requests package |
| 43 | pip: |
| 44 | name=requests |
| 45 | state=absent |