From 579fdfa79cd2e7c8e8cc6e4ba49f42b3a36abac7 Mon Sep 17 00:00:00 2001 From: DBV Date: Sun, 10 May 2020 13:47:11 +0200 Subject: [PATCH 1/3] Fix for state warning in ansible 2.6.5 --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 4119297..590990c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -62,4 +62,4 @@ file: path: "/etc/cron.hourly/logrotate" src: "/etc/cron.daily/logrotate" - state: "{{ 'link' if logrotate_use_hourly_rotation else 'absent' }}" + state: "{{ 'link' if logrotate_use_hourly_rotation is defined | default('absent') }}" From e10d995d618c0f483bcd74d6539a3f644ee9fad0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 17 Aug 2023 11:21:40 +0200 Subject: [PATCH 2/3] upd: documentation with role requirement --- CHANGELOG.md | 4 ++++ README.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1923a3..d7f38a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [human-readable changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +- Added role requirements for gathered facts. + ## 1.5.2 ### Fixed diff --git a/README.md b/README.md index cb78a36..d44e9c6 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Installs and configures logrotate ## Requirements -None +* The role requires `gathered_facts: true` to be set. ## Role Variables From 2e68e738d40b1d5fddd7ee4c7c0b9b1db69501c1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 17 Aug 2023 20:32:05 +0200 Subject: [PATCH 3/3] upd: task names --- tasks/main.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 590990c..afec3e9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,6 @@ --- # tasks file for arillso.logrotate - -- name: add OS specific variables +- name: Main | Add OS specific variables include_vars: '{{ loop_vars }}' with_first_found: - files: @@ -23,7 +22,7 @@ - configuration - packages -- name: 'install logrotate packages' +- name: Main | Manage logrotate packages become: true package: name: '{{ logrotate_package }}' @@ -34,7 +33,7 @@ tags: - packages -- name: 'create logrotate configuration file' +- name: Main | Create logrotate configuration file become: true template: src: 'etc/logrotate.conf.j2' @@ -45,7 +44,7 @@ tags: - configuration -- name: 'create logrotate application configuration files' +- name: Main | Create logrotate application configuration files become: true template: src: 'etc/logrotate.d/application.j2' @@ -58,8 +57,8 @@ tags: - configuration -- name: Symlink for hourly rotation - file: +- name: Main | Symlink for hourly rotation + ansible.builtin.file: path: "/etc/cron.hourly/logrotate" src: "/etc/cron.daily/logrotate" state: "{{ 'link' if logrotate_use_hourly_rotation is defined | default('absent') }}"