-
-
Save dreiggy/11d9586cbe8805a02e3fba59f82586c8 to your computer and use it in GitHub Desktop.
Ansible Playbook Installing System Updates for YUM and APT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: Install system updates for centos systems | |
yum: | |
name: '*' | |
state: latest | |
update_cache: yes | |
#cache_valid_time: 3600 | |
when: | |
- ansible_os_family == "RedHat" | |
- ansible_distribution == "CentOS" | |
- name: Install system updates for ubuntu systems | |
apt: | |
name: '*' | |
state: latest | |
update_cache: yes | |
#cache_valid_time: 3600 | |
when: | |
- ansible_os_family == "Debian" | |
- ansible_distribution == "Ubuntu" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment