88f1e32aa9
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
14 lines
348 B
Bash
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
|