Created
June 19, 2017 09:41
-
-
Save allanice001/2918590bb4c3018db111f99b4469097c to your computer and use it in GitHub Desktop.
Upgrade playbook for RedHat and Debian type hosts
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: Update packages list (apt) | |
apt: update_cache=yes | |
when: ansible_os_family == 'Debian' | |
- name: Update package list (yum) | |
yum: update_cache=yes name=* state=latest | |
when: ansible_os_family == 'RedHat' | |
- name: Upgrade packages (apt) | |
apt: upgrade=safe | |
when: ansible_os_family == 'Debian' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment