2016-08-01 19:11:50 +00:00
|
|
|
---
|
2017-03-03 13:36:14 +00:00
|
|
|
- name: Ensure log directories exist
|
2018-03-06 13:25:16 +00:00
|
|
|
vars:
|
|
|
|
nginx_user: "{{ 'www-data' if is_debian else 'nginx' }}"
|
|
|
|
is_debian: "{{ kolla_base_distro in ['debian', 'ubuntu'] }}"
|
2019-04-09 11:59:02 +00:00
|
|
|
become: true
|
2017-03-03 13:36:14 +00:00
|
|
|
command: >
|
|
|
|
docker exec bifrost_deploy
|
|
|
|
bash -c 'mkdir -p /var/log/kolla/ironic &&
|
|
|
|
chown ironic:ironic /var/log/kolla/ironic &&
|
|
|
|
mkdir -p /var/log/kolla/ironic-inspector &&
|
|
|
|
chown ironic:ironic /var/log/kolla/ironic-inspector &&
|
|
|
|
mkdir -p /var/log/kolla/nginx &&
|
2018-03-06 13:25:16 +00:00
|
|
|
chown {{ nginx_user }}:{{ nginx_user }} /var/log/kolla/nginx'
|
2017-03-03 13:36:14 +00:00
|
|
|
|
2016-08-01 19:11:50 +00:00
|
|
|
- name: Bootstrap bifrost (this may take several minutes)
|
2019-04-09 11:59:02 +00:00
|
|
|
become: true
|
2016-08-01 19:11:50 +00:00
|
|
|
command: >
|
|
|
|
docker exec bifrost_deploy
|
2019-04-09 14:22:35 +00:00
|
|
|
bash -c 'source /bifrost/env-vars &&
|
2017-02-16 18:31:15 +00:00
|
|
|
ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target
|
2016-08-01 19:11:50 +00:00
|
|
|
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
|
|
|
|
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
|
2017-01-24 00:03:27 +00:00
|
|
|
|
2016-10-26 14:17:34 +00:00
|
|
|
- name: Installing ssh keys
|
2019-04-09 11:59:02 +00:00
|
|
|
become: true
|
2016-08-03 14:25:52 +00:00
|
|
|
command: >
|
|
|
|
docker exec bifrost_deploy
|
|
|
|
bash -c 'mkdir /root/.ssh ; mkdir /home/ironic/.ssh;
|
|
|
|
cp -f /etc/bifrost/id_rsa /root/.ssh/id_rsa &&
|
|
|
|
cp -f /etc/bifrost/id_rsa.pub /root/.ssh/id_rsa.pub &&
|
|
|
|
cp -f /etc/bifrost/ssh_config /root/.ssh/config &&
|
|
|
|
cp -f /etc/bifrost/id_rsa /home/ironic/.ssh/id_rsa &&
|
|
|
|
cp -f /etc/bifrost/id_rsa.pub /home/ironic/.ssh/id_rsa.pub &&
|
|
|
|
cp -f /etc/bifrost/ssh_config /home/ironic/.ssh/config &&
|
|
|
|
chmod 600 /root/.ssh/id_rsa &&
|
|
|
|
chmod 600 /root/.ssh/id_rsa.pub &&
|
|
|
|
chmod 600 /root/.ssh/config &&
|
|
|
|
chmod 600 /home/ironic/.ssh/id_rsa &&
|
|
|
|
chmod 600 /home/ironic/.ssh/id_rsa.pub &&
|
|
|
|
chmod 600 /home/ironic/.ssh/config &&
|
|
|
|
chown ironic:ironic /home/ironic/.ssh/id_rsa &&
|
|
|
|
chown ironic:ironic /home/ironic/.ssh/id_rsa.pub &&
|
|
|
|
chown ironic:ironic /home/ironic/.ssh/config'
|