blob: 975f2ece65103c9f79a23f8abf48c4c7edbe74b7 [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:
Zack Williams6f5a6e72016-08-10 17:45:27 -07006 name: "{{ item }}"
7 state: present
8 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:
Zack Williams6f5a6e72016-08-10 17:45:27 -070015 name: ubuntu
16 groups: adm
Andy Bavier3a1d0642016-07-01 14:11:39 -040017
Zack Williams709f11b2016-03-17 14:29:51 -070018- name: Add head node ubuntu user key
19 authorized_key:
Zack Williams6f5a6e72016-08-10 17:45:27 -070020 user: ubuntu
21 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:
Zack Williams6f5a6e72016-08-10 17:45:27 -070025 user: root
26 key: "{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}"
Andy Bavier3a1d0642016-07-01 14:11:39 -040027
Zack Williams709f11b2016-03-17 14:29:51 -070028- name: Add route via /etc/rc.local
Zack Williams6f5a6e72016-08-10 17:45:27 -070029 when: not on_maas
Zack Williams709f11b2016-03-17 14:29:51 -070030 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