Make the apache-logs-conf role even less verbose

Round 2 to add no_log to more things. Specific looping over stats, it
is pretty noise in logs and doesn't seem to add any value.

Change-Id: I580171e0061fa331f3ed510713f1ac7a1a6cb5ea
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-02-21 14:23:10 -05:00
parent 3e7b7c1dd6
commit c9c39a4b04
No known key found for this signature in database
GPG Key ID: 611A80832067AF38

View File

@ -10,11 +10,13 @@
path: "/var/log/apache2" path: "/var/log/apache2"
file_type: any file_type: any
register: debian_suse_apache_logs register: debian_suse_apache_logs
- name: Dereference files - name: Dereference files
stat: stat:
path: "{{ item.path }}" path: "{{ item.path }}"
with_items: "{{ debian_suse_apache_logs.files }}" with_items: "{{ debian_suse_apache_logs.files }}"
register: debian_suse_apache_deref_logs register: debian_suse_apache_deref_logs
- name: Create hard links - name: Create hard links
file: file:
src: "{{ item.stat.lnk_source | default(item.stat.path) }}" src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
@ -24,6 +26,7 @@
when: when:
- item.stat.isreg or item.stat.islnk - item.stat.isreg or item.stat.islnk
when: ansible_os_family in ('Debian', 'Suse') when: ansible_os_family in ('Debian', 'Suse')
no_log: true
- name: Link apache logs on RedHat - name: Link apache logs on RedHat
block: block:
@ -32,11 +35,13 @@
path: "/var/log/httpd" path: "/var/log/httpd"
file_type: any file_type: any
register: redhat_apache_logs register: redhat_apache_logs
- name: Dereference files - name: Dereference files
stat: stat:
path: "{{ item.path }}" path: "{{ item.path }}"
with_items: "{{ redhat_apache_logs.files }}" with_items: "{{ redhat_apache_logs.files }}"
register: redhat_apache_deref_logs register: redhat_apache_deref_logs
- name: Create hard links - name: Create hard links
file: file:
src: "{{ item.stat.lnk_source | default(item.stat.path) }}" src: "{{ item.stat.lnk_source | default(item.stat.path) }}"
@ -46,6 +51,7 @@
when: when:
- item.stat.isreg or item.stat.islnk - item.stat.isreg or item.stat.islnk
when: ansible_os_family == 'Redhat' when: ansible_os_family == 'Redhat'
no_log: true
- name: Ensure {{ stage_dir }}/apache_config apache_config exists - name: Ensure {{ stage_dir }}/apache_config apache_config exists
file: file: