-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swithc to role based testing, bump node to 0.10.44, use ansible facts…
… rather than shell
- Loading branch information
David Farrington
committed
May 4, 2016
1 parent
f1c92d4
commit 28dc212
Showing
10 changed files
with
86 additions
and
26 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
[defaults] | ||
<<<<<<< f1c92d4cc19c8c520b8f133992f224dacf43af2a | ||
roles_path = ~/roles/ | ||
======= | ||
roles_path = ../ | ||
>>>>>>> Swithc to role based testing, bump node to 0.10.44, use ansible facts rather than shell |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Process the output of the given file (should contain a plays stdout/err) | ||
# If we pass, return with 0 else return with 1, and print useful output | ||
|
||
_file="$1" | ||
|
||
# Assert filename has been passed | ||
[ $# -eq 0 ] && { echo "Usage: $0 filename"; exit 1; } | ||
|
||
# Assert file exists | ||
[ ! -f "$_file" ] && { echo "$0: $_file file not found."; exit 2; } | ||
|
||
# Make sure nothing has changed or failed | ||
grep -q 'changed=0.*failed=0' $_file | ||
|
||
# Success condition | ||
if [ $? -eq 0 ]; then | ||
echo 'Idempotence test: pass' | ||
exit | ||
|
||
# Failure condition, extract useful information and exit | ||
else | ||
echo 'Idempotence test: fail' | ||
echo '' | ||
grep --color=auto -B1 -A1 "\(changed\|failed\):" $_file | ||
exit 1 | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
- hosts: all | ||
remote_user: root | ||
become: yes | ||
vars_files: | ||
- ./vars.yml | ||
roles: | ||
- role: nodejs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
|
||
- role: ANXS.build-essential |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
nodejs_install_method : "package" | ||
nodejs_version : "0.10.44" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[anxs] | ||
anxs.local ansible_ssh_host=192.168.88.17 ansible_ssh_port=22 | ||
anxs.local ansible_ssh_host=192.168.88.17 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key |