Ensure OS Patch

This commit is contained in:
2019-11-21 21:35:13 -06:00
parent 07ea4550a0
commit 90a7d2c631
9 changed files with 162 additions and 1 deletions

25
tasks/main.yml Normal file
View File

@@ -0,0 +1,25 @@
---
# tasks file for ensure_os_patch
- name: 'package discovery'
when:
- ansible_system == 'Linux'
- packages is not defined
package_facts:
- name: 'service discovery'
when:
- ansible_system == 'Linux'
- services is not defined
service_facts:
- name: 'ensure patch'
when:
- ansible_system == 'Linux'
- ansible_distribution == 'CentOS' or ansible_distribution == 'Fedora' or ansible_distribution == 'OracleLinux'
package:
name: '*'
state: 'latest'
notify:
- 'package_facts'
- 'service_facts'
- name: 'flush handlers'
meta: 'flush_handlers'