Update to use FQCN

This commit is contained in:
Jason Rothstein 2020-11-29 18:09:48 -06:00
parent 2b57a5b9d8
commit c8b1b6c7b2
3 changed files with 12 additions and 9 deletions

View File

@ -30,7 +30,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
------------------

View File

@ -1,7 +1,7 @@
---
# handlers file for ensure_os_patch
- name: 'ensure_os_patch.package_facts'
package_facts:
ansible.builtin.package_facts:
- name: 'ensure_os_patch.service_facts'
service_facts:
ansible.builtin.service_facts:

View File

@ -4,17 +4,17 @@
when:
- ansible_system == 'Linux'
- packages is not defined
package_facts:
ansible.builtin.package_facts:
- name: 'service discovery'
when:
- ansible_system == 'Linux'
- services is not defined
service_facts:
ansible.builtin.service_facts:
- name: 'ensure patch'
when:
- ansible_system == 'Linux'
- ansible_pkg_mgr == 'dnf' or ansible_pkg_mgr == 'yum'
package:
ansible.builtin.package:
name: '*'
state: 'latest'
notify:
@ -24,16 +24,19 @@
when:
- ansible_system == 'Linux'
- ansible_pkg_mgr == 'apt'
apt:
ansible.builtin.apt:
autoclean: 'yes'
autoremove: 'yes'
upgrade: 'dist'
notify:
- 'ensure_os_patch.package_facts'
- 'ensure_os_patch.service_facts'
- name: 'Ensure dnf-automatic installation'
when:
- ansible_system == 'Linux'
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version is version('21', '>=')
package:
ansible.builtin.package:
name:
- 'dnf-automatic'
state: 'present'
@ -45,7 +48,7 @@
- ansible_system == 'Linux'
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version is version('21', '>=')
service:
ansible.builtin.service:
enabled: 'yes'
name: 'dnf-automatic-install.timer'
state: 'started'