Created
February 4, 2015 14:24
-
-
Save juliedavila/d2ae0cdc6720b8b5e3ba to your computer and use it in GitHub Desktop.
Rough example of openssl vuln patch
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: Patching Heartbleed | |
hosts: "{{ hosts }}" | |
sudo: yes | |
tasks: | |
- name: Detect if Vulnerable | |
command: openssl -b | |
register: results | |
ignore_errors: yes | |
- name: Patching APT based packages | |
apt: upgrade={{ item }} update_cache=yes | |
when: ansible_os_family == "Debian" and results.stdout contains "build date SOMEDATE" | |
notify: Restart Host | |
with_items: | |
- libssl | |
- etc | |
handlers: | |
- name: Restart Host | |
command: /sbin/reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment