Skip to content

Commit f98ad94

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "toolbox: Move custom Ansible config to global location"
2 parents b4b206d + 88f1e32 commit f98ad94

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

docker/kolla-toolbox/Dockerfile.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,15 @@ RUN {{ macros.install_pip(kolla_toolbox_pip_packages | customizable("pip_package
103103
ENV ANSIBLE_LIBRARY /usr/share/ansible:$ANSIBLE_LIBRARY
104104

105105
COPY find_disks.py /usr/share/ansible/
106-
COPY ansible.cfg /var/lib/ansible/.ansible.cfg
106+
COPY ansible.cfg /etc/ansible/ansible.cfg
107107
RUN chmod 644 /usr/share/ansible/find_disks.py \
108-
/var/lib/ansible/.ansible.cfg
108+
/etc/ansible/ansible.cfg
109109

110110
COPY ansible_sudoers /etc/sudoers.d/kolla_ansible_sudoers
111111
RUN chmod 440 /etc/sudoers.d/kolla_ansible_sudoers
112112

113+
COPY extend_start.sh /usr/local/bin/kolla_extend_start
114+
113115
{% block kolla_toolbox_footer %}{% endblock %}
114116
{% block footer %}{% endblock %}
115117

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
if [[ ! -f "/var/log/kolla/ansible.log" ]]; then
4+
touch /var/log/kolla/ansible.log
5+
fi
6+
7+
if [[ $(stat -c %U:%G /var/log/kolla/ansible.log) != "ansible:kolla" ]]; then
8+
chown -R ansible:kolla /var/log/kolla/ansible.log
9+
fi
10+
11+
if [[ $(stat -c %a /var/log/kolla/ansible.log) != "664" ]]; then
12+
chmod 664 /var/log/kolla/ansible.log
13+
fi
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes kolla-toolbox ansible.log logging for different users than ansible.
5+
`LP#1942846 <https://launchpad.net/bugs/1942846>`__

0 commit comments

Comments
 (0)