kolla/docker/kolla-toolbox/extend_start.sh
Michał Nasiadka 88f1e32aa9 toolbox: Move custom Ansible config to global location
In order to achieve logging to /var/log/kolla/ansible.log from different
users than default ansible - the config needs to be moved to global
location.

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/807679
Closes-Bug: #1942846
Change-Id: I4325fe031647a04766516afa528639d6ff0b5ae6
2021-09-07 18:00:46 +00:00

14 lines
348 B
Bash

#!/bin/bash
if [[ ! -f "/var/log/kolla/ansible.log" ]]; then
touch /var/log/kolla/ansible.log
fi
if [[ $(stat -c %U:%G /var/log/kolla/ansible.log) != "ansible:kolla" ]]; then
chown -R ansible:kolla /var/log/kolla/ansible.log
fi
if [[ $(stat -c %a /var/log/kolla/ansible.log) != "664" ]]; then
chmod 664 /var/log/kolla/ansible.log
fi