Skip to content

Instantly share code, notes, and snippets.

@carsongee
Last active August 29, 2015 14:14
Show Gist options
  • Save carsongee/7aa568e6d25d2f9e07f3 to your computer and use it in GitHub Desktop.
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
- 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