diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d88a6d..55f1ddf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased](https://github.com/idealista/rsyslog_role/tree/develop) +## [1.1.0](https://github.com/idealista/rsyslog_role/tree/1.1.0) +### Added +- *[#1](https://github.com/idealista/rsyslog_role/issues/1) Adding variables to enable/disable rsyslog service in defaults/main.yml* @dortegau + ## [1.0.0](https://github.com/idealista/rsyslog_role/tree/1.0.0) ### Added - *First version* @dortegau diff --git a/defaults/main.yml b/defaults/main.yml index 72b7d65..8f47d4b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,6 +6,10 @@ rsyslog_version: 8.24.0-1 rsyslog_required_libs: [] ## Service options +# start on boot +rsyslog_service_enabled: true +# current state: started, stopped +rsyslog_service_state: started # Owner rsyslog_user: rsyslog diff --git a/tasks/main.yml b/tasks/main.yml index 3fdf593..30b1d9b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,3 +9,8 @@ import_tasks: config.yml tags: - rsyslog-config + +- name: RSYSLOG | Service + import_tasks: service.yml + tags: + - rsyslog-service diff --git a/tasks/service.yml b/tasks/service.yml new file mode 100644 index 0000000..d031871 --- /dev/null +++ b/tasks/service.yml @@ -0,0 +1,8 @@ +--- + +- name: RSYSLOG | Configuring service + systemd: + name: rsyslog + state: "{{ rsyslog_service_state }}" + enabled: "{{ rsyslog_service_enabled }}" + daemon_reload: true