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: |
| 6 | name={{ item }} |
| 7 | state=latest |
Zack Williams | 7ec058b | 2016-05-02 10:10:39 -0700 | [diff] [blame] | 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: |
| 15 | name=ubuntu |
| 16 | groups=admin |
| 17 | |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 18 | - name: Add head node ubuntu user key |
| 19 | authorized_key: |
| 20 | user=ubuntu |
Zack Williams | d31bbc9 | 2016-05-20 11:43:18 -0700 | [diff] [blame] | 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: |
| 25 | user=root |
| 26 | key="{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}" |
| 27 | |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 28 | - name: Add route via /etc/rc.local |
| 29 | template: |
| 30 | src=rc.local.j2 |
| 31 | dest=/etc/rc.local |
| 32 | mode=0755 |
| 33 | notify: |
| 34 | - run rc.local |
Andy Bavier | fc43e84 | 2016-07-14 13:01:45 +0200 | [diff] [blame] | 35 | when: not on_maas |
Zack Williams | 709f11b | 2016-03-17 14:29:51 -0700 | [diff] [blame] | 36 | |
| 37 | - name: Create /var/lib/nova dir |
| 38 | file: |
| 39 | path=/var/lib/nova |
| 40 | state=directory |