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 License
------- -------
LGPL >= 3 LGPL-3.0-or-later
Author Information Author Information
------------------ ------------------

View File

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

View File

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