This file contains hidden or 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
| #!/bin/bash | |
| URL=http://localhost:8080 | |
| ## Unit-Testable Shell Scripts (http://eradman.com/posts/ut-shell-scripts.html) | |
| typeset -i tests_run=0 | |
| function try { this="$1"; } | |
| trap 'printf "$0: exit code $? on line $LINENO\nFAIL: $this\n"; exit 1' ERR | |
| function assert { | |
| let tests_run+=1 |
This file contains hidden or 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 has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |
This file contains hidden or 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
| #/bin/bash | |
| # bash-autopatch.sh | |
| # A shell script that fully automates the "manual" patching of GNU Bash, using source and all known official patches. | |
| # Contributed by Mike Marino, based on Steve Jenkins' manual Bash patching and compiling procedure at: | |
| # http://stevejenkins.com/blog/2014/09/how-to-manually-update-bash-to-patch-shellshock-bug-on-older-fedora-based-systems/ | |
| # This script is a "continuation" of Steve Cook's bash-multipath.sh at: https://gist.github.com/stevejenkins/3d64d3543060c1bcac92 | |
| # Version 1.0 - October 10, 2014 |
NewerOlder