Last active
August 29, 2015 14:14
-
-
Save carsongee/7aa568e6d25d2f9e07f3 to your computer and use it in GitHub Desktop.
ansible play to update libc6 for GHOST and reboot serially. works for rhel and debian based distros
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
- name: Update libc6 and reboot | |
hosts: all | |
sudo: yes | |
# Comment out to apply to all servers | |
serial: 1 | |
tasks: | |
- name: "Install packages and update cache" | |
apt: name="{{ item }}" state=latest update_cache=yes | |
with_items: | |
- libc6 | |
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' | |
- name: "Install packages and update cache" | |
yum: name="{{ item }}" state=latest | |
with_items: | |
- glibc | |
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' | |
- name: "Reboot the server" | |
command: /sbin/reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment