blob: 0c57979fd6ce2a55e94dcdd8f7cd7b0fb001ad73 [file] [log] [blame]
Zack Williams8625d042016-02-26 14:32:43 -07001---
2# file: roles/compute-prep/tasks/main.yml
3
Zack Williams709f11b2016-03-17 14:29:51 -07004- name: Install packages
Zack Williamsb2b8c7b2016-03-10 12:47:18 -07005 apt:
6 name={{ item }}
7 state=latest
Zack Williams7ec058b2016-05-02 10:10:39 -07008 update_cache=yes
9 cache_valid_time=3600
Zack Williams8625d042016-02-26 14:32:43 -070010 with_items:
11 - python-yaml
12
Andy Bavier3a1d0642016-07-01 14:11:39 -040013- name: Add ubuntu user
14 user:
15 name=ubuntu
16 groups=admin
17
Zack Williams709f11b2016-03-17 14:29:51 -070018- name: Add head node ubuntu user key
19 authorized_key:
20 user=ubuntu
Zack Williamsd31bbc92016-05-20 11:43:18 -070021 key="{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}"
Zack Williams709f11b2016-03-17 14:29:51 -070022
Andy Bavier3a1d0642016-07-01 14:11:39 -040023- name: Add head node root user key
24 authorized_key:
25 user=root
26 key="{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}"
27
Zack Williams709f11b2016-03-17 14:29:51 -070028- 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 Bavier3a1d0642016-07-01 14:11:39 -040035 when: not cord_provisioned
Zack Williams709f11b2016-03-17 14:29:51 -070036
37- name: Create /var/lib/nova dir
38 file:
39 path=/var/lib/nova
40 state=directory