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 | |
declare -r NEW_SITE_IP="162.209.67.97" | |
declare -r OLD_SITE_IP="96.126.112.51" | |
declare -r HOST_FILE="/etc/hosts" | |
declare -r SITE=$1 | |
function report_current_site() { | |
grep -q "" $HOST_FILE | |
if [ $? != 0 ]; then |
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 | |
function clear_audit_logs() { | |
/bin/cat /dev/null > /var/log/audit.log | |
/bin/cat /dev/null > /var/log/wtmp | |
} | |
function remove_ssh_host_keys() { | |
/bin/rm -f /etc/ssh/*key* | |
} |
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
go build -gcflags=-S hello.go | |
# command-line-arguments | |
--- prog list "main" --- | |
0000 (/Users/kelseyhightower/hello.go:5) TEXT main+0(SB),$48-0 | |
0001 (/Users/kelseyhightower/hello.go:5) LOCALS ,$0 | |
0002 (/Users/kelseyhightower/hello.go:6) MOVQ os.Stdout+0(SB),SI | |
0003 (/Users/kelseyhightower/hello.go:6) MOVQ SI,(SP) | |
0004 (/Users/kelseyhightower/hello.go:6) LEAQ go.string."Hello, World\n"+0(SB),SI | |
0005 (/Users/kelseyhightower/hello.go:6) LEAQ 8(SP),BP |
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
package main | |
import ( | |
"bytes" | |
"code.google.com/p/go.crypto/ssh" | |
"code.google.com/p/go.crypto/ssh/terminal" | |
"crypto" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"syscall" | |
"time" | |
) |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
t := time.Now() |
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
--- | |
- hosts: nginx | |
tasks: | |
- add_host: name={{ host }} groups=nginx | |
roles: | |
- nginx |
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
$ ansible-playbook playbooks/nginx.yml -e "host=192.168.12.131" --list-hosts | |
playbook: playbooks/nginx.yml | |
play #1 (nginx): host count=0 | |
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
$ ansible-playbook playbooks/nginx.yml -e "host=192.168.12.131" --list-hosts | |
playbook: playbooks/nginx.yml | |
play #1 (localhost): host count=0 | |
play #2 (nginx): host count=0 | |
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
$ ansible-playbook playbooks/nginx.yml -e "host=192.168.12.131" | |
PLAY [localhost] ************************************************************** | |
skipping: no hosts matched | |
PLAY [nginx] ****************************************************************** | |
skipping: no hosts matched | |
PLAY RECAP ******************************************************************** |
OlderNewer