910f9bd36f
First part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. This implements kolla_container_engine variable in command calls of docker,so later on it can be also used for podman without further change. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Change-Id: Ic30b67daa2e215524096ad1f4385c569e3d41b95
46 lines
1.8 KiB
YAML
46 lines
1.8 KiB
YAML
---
|
|
- name: Ensure log directories exist
|
|
vars:
|
|
nginx_user: "{{ 'www-data' if is_debian else 'nginx' }}"
|
|
is_debian: "{{ kolla_base_distro in ['debian', 'ubuntu'] }}"
|
|
become: true
|
|
command: >
|
|
{{ kolla_container_engine }} 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 &&
|
|
chown {{ nginx_user }}:{{ nginx_user }} /var/log/kolla/nginx'
|
|
|
|
- name: Bootstrap bifrost (this may take several minutes)
|
|
become: true
|
|
command: >
|
|
{{ kolla_container_engine }} exec bifrost_deploy
|
|
bash -c
|
|
'ansible-playbook {{ bifrost_deploy_verbosity }}
|
|
-i /bifrost/playbooks/inventory/target
|
|
/bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
|
|
-e @/etc/bifrost/dib.yml -e skip_package_install=true'
|
|
|
|
- name: Installing ssh keys
|
|
become: true
|
|
command: >
|
|
{{ kolla_container_engine }} 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'
|