blob: 0a5274bdde71234ba0f83da6f0bbb50fd7834dc6 [file] [log] [blame]
Zack Williams8625d042016-02-26 14:32:43 -07001---
Zack Williams5223dd92017-02-28 23:38:02 -07002# file: compute-prep/tasks/main.yml
Zack Williams8625d042016-02-26 14:32:43 -07003
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 }}"
Zack Williams6f5a6e72016-08-10 17:45:27 -07007 update_cache: yes
8 cache_valid_time: 3600
Zack Williams8625d042016-02-26 14:32:43 -07009 with_items:
10 - python-yaml
Zack Williams5223dd92017-02-28 23:38:02 -070011 - python-pip
Zack Williams8625d042016-02-26 14:32:43 -070012
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 Williams5223dd92017-02-28 23:38:02 -070018- name: Add pod public key to user accounts
19 when: not on_maas
20 authorized_key:
21 user: "{{ item }}"
22 key: "{{ lookup('file', '{{ ssh_pki_dir }}/client_certs/{{ pod_sshkey_name }}_sshkey.pub') }}"
23 with_items:
24 - root
25 - ubuntu
26
27- name: Add pod public key to user accounts (MaaS)
28 when: on_maas
29 authorized_key:
30 user: "{{ item }}"
31 key: "{{ lookup('file', '/opt/cord_profile/node_key.pub') }}"
32 with_items:
33 - root
34 - ubuntu
35
36- name: Copy over CA certs from head node (MaaS)
37 when: on_maas
Zack Williamsc047c872017-01-11 08:38:15 -070038 synchronize:
39 src: "/usr/local/share/ca-certificates/"
40 dest: "/usr/local/share/ca-certificates/"
41 notify:
Zack Williams5223dd92017-02-28 23:38:02 -070042 - update-ca-certificates
Zack Williams709f11b2016-03-17 14:29:51 -070043
44- name: Create /var/lib/nova dir
45 file:
Zack Williams5223dd92017-02-28 23:38:02 -070046 path: /var/lib/nova
47 state: directory
Andy Bavier30d27c92016-09-15 15:59:17 -040048
Zack Williams5223dd92017-02-28 23:38:02 -070049- name: Remove requests package which causes SSL errors
Andy Bavier30d27c92016-09-15 15:59:17 -040050 pip:
Zack Williams5223dd92017-02-28 23:38:02 -070051 name: "requests"
52 state: absent