Created
October 22, 2014 21:00
-
-
Save phips/3297e7910da78556e222 to your computer and use it in GitHub Desktop.
Quick Ansible check for Shellshock
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 | |
gather_facts: no | |
tasks: | |
- name: Check for Shellshock vulnerability | |
command: env x='() { :;}; echo vulnerable' bash -c "echo ok" | |
register: result | |
- name: Skip if not vulnerable | |
debug: msg="This host is vulnerable, patch bash" | |
when: '"vulnerable" in result.stdout' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment