From 03f52d0bc8924d189e7690c34b08b3eeabfd683e Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 17 Aug 2018 12:56:27 -0500 Subject: [PATCH] Move ansible log into directory file: state=touch returns changed every time. Instead, put the log files into a /var/log/ansible directory. Change-Id: I086d803f0e532b9da41cb01d4e7d2ed66245dfc1 --- playbooks/roles/install-ansible/files/ansible.cfg | 2 +- playbooks/roles/install-ansible/tasks/main.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/playbooks/roles/install-ansible/files/ansible.cfg b/playbooks/roles/install-ansible/files/ansible.cfg index 96db79224d..df61b8c872 100644 --- a/playbooks/roles/install-ansible/files/ansible.cfg +++ b/playbooks/roles/install-ansible/files/ansible.cfg @@ -1,7 +1,7 @@ [defaults] inventory=/opt/system-config/inventory/openstack.yaml,/opt/system-config/inventory/groups.yaml,/etc/ansible/hosts/emergency library=/usr/share/ansible -log_path=/var/log/ansible.log +log_path=/var/log/ansible/ansible.log callback_plugins=/etc/ansible/callback_plugins inventory_plugins=/etc/ansible/inventory_plugins roles_path=/opt/system-config/roles:/etc/ansible/roles diff --git a/playbooks/roles/install-ansible/tasks/main.yaml b/playbooks/roles/install-ansible/tasks/main.yaml index f4e58c0847..26dfe67dfb 100644 --- a/playbooks/roles/install-ansible/tasks/main.yaml +++ b/playbooks/roles/install-ansible/tasks/main.yaml @@ -24,13 +24,13 @@ group: admin mode: 0770 -- name: Ensure ansible log file is writable +- name: Ensure ansible log dir is writable file: - path: /var/log/ansible.log - state: touch + path: /var/log/ansible + state: directory owner: root group: admin - mode: 0660 + mode: 0775 - name: Copy ansible.cfg in to place copy: