Fix log search dir conditional

Fix bug with search dir conditional introduced by
Iba17bed79e26e6e7eb2300d413058145ec680d87.

Change-Id: I291e3582e5cb01f4a9c394bc8e7d8289ca577f90
Closes-Bug: #1648490
This commit is contained in:
Logan V 2016-12-08 09:28:47 -06:00
parent efb3630537
commit f57486e1a9
3 changed files with 7 additions and 2 deletions

View File

@ -26,7 +26,6 @@ rsyslog_client_spool_directory: /var/spool/rsyslog
# discovery process. This will force the logs from a given directory
# to be shipped using rsyslog.
# rsyslog_client_log_dir: /var/log/project
rsyslog_client_log_dir: false
# Set the `rsyslog_client_log_files` variable in list format to skip
# log discovery all together and ship only log files that are explicitly

View File

@ -30,7 +30,7 @@
stat:
path: "{{ rsyslog_client_log_dir }}"
when:
- "{{ rsyslog_client_log_dir | bool }}"
- "{{ rsyslog_client_log_dir is defined }}"
register: log_dir
- name: Find all log files

View File

@ -78,8 +78,14 @@
- "'$ActionQueueFileName test2' in rsyslog_client_content"
- "'$ActionQueueFileName test-splunk1' in rsyslog_client_content"
- "'$ActionQueueFileName test-loggly1' in rsyslog_client_content"
# check for log files that are explicitly defined in rsyslog_client_log_files
- "'/var/log/dmesg' in logrotate_client_content"
- "'/var/log/udev' in logrotate_client_content"
# check for a log file that should be discovered via rsyslog_client_log_dir
# /var/log/kern.log should exist on Ubuntu
# /var/log/yum.log should exist on CentOS
- "'/var/log/kern.log' in logrotate_client_content
or '/var/log/yum.log' in logrotate_client_content"
- "'size 1G' in logrotate_client_content"
- "rsyslog_default_file.stat.exists"
- "rsyslog_client_file.stat.exists"