Last active
August 29, 2015 14:06
-
-
Save tgerla/6f7e20585d8f511ae4c2 to your computer and use it in GitHub Desktop.
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
--- | |
# this play queries all servers and creates groups | |
- hosts: all | |
remote_user: root | |
# remote_user: someuser | |
# sudo: true | |
tasks: | |
- name: create dynamic groups based on OS | |
group_by: key=ansible_os_family | |
# this play applies the patch only to Red Hat machines | |
- hosts: RedHat | |
remote_user: root | |
tasks: | |
- name: Update bash for RHEL/CentOS | |
yum: name=bash state=latest | |
# this play applies the patch only to Debian machines | |
- hosts: Debian | |
remote_user: root | |
tasks: | |
- name: Update bash for Ubuntu/Debian | |
apt: name=bash state=latest update_cache=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment