Use Ansible FQCN
This commit is contained in:
parent
d14565866d
commit
4250f753ea
@ -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
|
||||
------------------
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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 }}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user