Ensure OS Patch
This commit is contained in:
25
tasks/main.yml
Normal file
25
tasks/main.yml
Normal 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'
|
||||
|
Reference in New Issue
Block a user