diff --git a/README.md b/README.md index c9f98a0..ce3d39c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Including an example of how to use your role (for instance, with variables passe License ------- -LGPL >= 3 +LGPL-3.0-or-later Author Information ------------------ diff --git a/handlers/main.yml b/handlers/main.yml index 1361333..0065a72 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,7 +1,7 @@ --- # handlers file for ensure_log_rotation - name: 'ensure_log_rotation.package_facts' - package_facts: + ansible.builtin.package_facts: - name: 'ensure_log_rotation.service_facts' - service_facts: + ansible.builtin.service_facts: diff --git a/tasks/main.yml b/tasks/main.yml index 68fd6b3..e5a2e44 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,14 +23,14 @@ when: - ansible_system == 'Linux' - packages is not defined - package_facts: + ansible.builtin.package_facts: - name: 'ensure packages' when: - ansible_system == 'Linux' - ensure_log_rotation is defined - ensure_log_rotation.package_list is defined - ensure_log_rotation.package_list is iterable - package: + ansible.builtin.package: name: '{{ item.name }}' state: '{{ item.state }}' loop: '{{ ensure_log_rotation.package_list }}' @@ -39,15 +39,13 @@ notify: - 'ensure_log_rotation.package_facts' - 'ensure_log_rotation.service_facts' -- name: 'flush handlers' - meta: 'flush_handlers' - name: 'ensure configuration' when: - ansible_system == 'Linux' - ensure_log_rotation is defined - ensure_log_rotation.template_list is defined - ensure_log_rotation.template_list is iterable - template: + ansible.builtin.template: attributes: '{{ item.attributes | default(omit) }}' backup: '{{ item.backup | default(omit) }}' dest: '{{ item.dest }}' @@ -71,7 +69,7 @@ - ensure_log_rotation is defined - ensure_log_rotation.service_list is defined - ensure_log_rotation.service_list is iterable - service: + ansible.builtin.service: enabled: '{{ item.enabled }}' name: '{{ item.name }}' state: '{{ item.state }}'