blob: 1607e5fb5b5110e13200cabf3ab5132d727f187d [file] [log] [blame]
---
# file: roles/compute-prep/tasks/main.yml
- name: Install packages
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items:
- python-yaml
- name: Add ubuntu user
user:
name: ubuntu
groups: adm
- name: Copy over CA certs
synchronize:
src: "/usr/local/share/ca-certificates/"
dest: "/usr/local/share/ca-certificates/"
notify:
- update-ca-certifictes on compute node
- name: List certs in /usr/local/share/ca-certificates/
command: "ls -la /usr/local/share/ca-certificates/"
register: certs_on_compute
tags:
- skip_ansible_lint # diagnostics
- name: Output from listing certs
debug: var=certs_on_compute
- name: Add head node ubuntu user key
authorized_key:
user: ubuntu
key: "{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}"
- name: Add head node root user key
authorized_key:
user: root
key: "{{ hostvars[groups['head'][0]]['sshkey']['stdout'] }}"
- name: Add route via /etc/rc.local
when: not on_maas
template:
src=rc.local.j2
dest=/etc/rc.local
mode=0755
notify:
- run rc.local
- name: Create /var/lib/nova dir
file:
path=/var/lib/nova
state=directory
- name: Remove superfluous requests package
pip:
name=requests
state=absent