Cleanup/standardize usage of tags

The numerous tags within the role have been condensed
to two tags: rsyslog-client-install and rsyslog-client-config

These tags have been chosen as they are namespaced
and cover the two major functions of the role.

Change-Id: Ie673eb71affc5bc550a06f53646e6b4569d15ff0
This commit is contained in:
Travis Truman 2016-06-20 12:20:03 -04:00
parent db623504c1
commit 52020882f0
6 changed files with 9 additions and 36 deletions

View File

@ -26,5 +26,14 @@
- always
- include: rsyslog_client_pre_install.yml
tags:
- rsyslog-client-install
- include: rsyslog_client_install.yml
tags:
- rsyslog-client-install
- include: rsyslog_client_post_install.yml
tags:
- rsyslog-client-install
- rsyslog-client-config

View File

@ -22,8 +22,6 @@
until: add_repos|success
retries: 5
delay: 2
tags:
- rsyslog-client-apt-repositories
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
@ -32,8 +30,6 @@
stat:
path: /var/cache/apt
register: apt_cache_stat
tags:
- rsyslog-client-apt-packages
- name: Update apt if needed
apt:
@ -41,8 +37,6 @@
when: >
"ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}" or
add_repos | changed
tags:
- rsyslog-client-apt-packages
- name: Install rsyslog packages
apt:
@ -53,5 +47,3 @@
retries: 5
delay: 2
with_items: "{{ rsyslog_client_packages }}"
tags:
- rsyslog-client-apt-packages

View File

@ -32,8 +32,6 @@
retries: 5
delay: 2
with_items: "{{ rsyslog_client_repos }}"
tags:
- rsyslog-client-yum-repositories
- name: Install rsyslog packages
yum:
@ -44,5 +42,3 @@
retries: 5
delay: 2
with_items: "{{ rsyslog_client_packages }}"
tags:
- rsyslog-client-yum-packages

View File

@ -16,11 +16,7 @@
- include: rsyslog_client_install-apt.yml
when:
- ansible_pkg_mgr == 'apt'
tags:
- install-apt
- include: rsyslog_client_install-yum.yml
when:
- ansible_pkg_mgr == 'yum'
tags:
- install-yum

View File

@ -18,8 +18,6 @@
name: "rsyslog"
state: "stopped"
failed_when: false
tags:
- rsyslog-client-config
- name: Rsyslog Setup
copy:
@ -27,8 +25,6 @@
dest: "/etc/rsyslog.d/50-default.conf"
owner: "root"
group: "root"
tags:
- rsyslog-client-config
- name: Find all log files
shell: |
@ -36,8 +32,6 @@
register: log_files
when: >
rsyslog_client_log_dir is defined
tags:
- rsyslog-client-config
- name: Write rsyslog config for found log files
template:
@ -45,14 +39,10 @@
dest: "/etc/rsyslog.conf"
owner: "root"
group: "root"
tags:
- rsyslog-client-config
- name: Union the log files
set_fact:
rsyslog_client_all_log_files: "{{ log_files.stdout_lines | default([]) | union(rsyslog_client_log_files) }}"
tags:
- rsyslog-client-config
- name: Write rsyslog target file
template:
@ -61,8 +51,6 @@
owner: "root"
group: "root"
when: (rsyslog_client_all_log_files | length) > 0
tags:
- rsyslog-client-config
- name: Write log rotate file
template:
@ -71,8 +59,6 @@
owner: "root"
group: "root"
when: (rsyslog_client_all_log_files | length) > 0
tags:
- rsyslog-client-config
- name: Configure logrotate to compress logs by default
lineinfile:
@ -80,12 +66,8 @@
regexp: "^#compress"
line: "compress"
backrefs: yes
tags:
- rsyslog-client-config
- name: Start rsyslog
service:
name: "rsyslog"
state: "started"
tags:
- rsyslog-client-config

View File

@ -31,5 +31,3 @@
state: "directory"
owner: "syslog"
group: "adm"
tags:
- rsyslog-client-dirs