-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a640cc8
commit 2c436f9
Showing
10 changed files
with
122 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,4 @@ cat << END > ./prod_infra3_inv.yaml | |
localhost | ||
END | ||
|
||
echo "setup_work_dir finished succesfully" |
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,6 @@ | ||
#!/bin/bash -l | ||
|
||
|
||
source ./tests/testing_lib.sh | ||
|
||
check_message_in_output 'ansible-deployer run -t task_exec_bin_true -s prod -i testInfra' '\[CRITICAL\]: Failed executing /etc/ansible-deploy/hooks/exit_hook.sh' |
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,7 @@ | ||
#!/bin/bash -l | ||
|
||
|
||
source ./tests/testing_lib.sh | ||
|
||
check_message_in_output 'ansible-deployer run -t task_exec_bin_true -s prod -i testInfra' '\[ERROR\]: /etc/ansible-deploy/hooks/error_hook.sh: line 3: dos2uni: command not found' | ||
check_run_ok 'ansible-deployer run -t task_exec_bin_true -s prod -i testInfra' |
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,6 @@ | ||
#!/bin/bash -l | ||
|
||
|
||
source ./tests/testing_lib.sh | ||
|
||
check_message_in_output 'ansible-deployer run -t task_exec_bin_true -s prod -i testInfra' '\[CRITICAL\]: Setup hook exit_hook failed, cannot continue' |
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,5 @@ | ||
#!/bin/bash -l | ||
|
||
dos2uni /etc/ansible-deploy/ansible-deploy.yaml | ||
|
||
ls -l /etc/ansible-deploy/ansible-deploy.yaml |
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,6 @@ | ||
#!/bin/bash -l | ||
|
||
dos2uni /etc/ansible-deploy/ansible-deploy.yaml | ||
ls -l /etc/ansible-deploy/ansible-deploy.yaml | ||
|
||
exit 1 |
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,36 @@ | ||
setup_hooks: | ||
- name: setup_ansible | ||
module: script | ||
opts: | ||
file: /etc/ansible-deploy/hooks/setup_work_dir.sh | ||
- name: error_hook | ||
module: script | ||
opts: | ||
file: /etc/ansible-deploy/hooks/error_hook.sh | ||
|
||
play_items: | ||
- name: run_bin_true | ||
file: runBinTrue.yaml | ||
|
||
tasks: | ||
- name: task_exec_bin_true | ||
play_items: | ||
- run_bin_true | ||
allowed_for: | ||
- group: test_group | ||
infra: | ||
- name: testInfra | ||
stages: | ||
- testing | ||
commit: | ||
- test_version | ||
- group: root | ||
infra: | ||
- name: testInfra | ||
stages: | ||
- testing | ||
- prod | ||
- locked | ||
commit: | ||
- test_version | ||
allow_limit: False |
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,36 @@ | ||
setup_hooks: | ||
- name: setup_ansible | ||
module: script | ||
opts: | ||
file: /etc/ansible-deploy/hooks/setup_work_dir.sh | ||
- name: exit_hook | ||
module: script | ||
opts: | ||
file: /etc/ansible-deploy/hooks/exit_hook.sh | ||
|
||
play_items: | ||
- name: run_bin_true | ||
file: runBinTrue.yaml | ||
|
||
tasks: | ||
- name: task_exec_bin_true | ||
play_items: | ||
- run_bin_true | ||
allowed_for: | ||
- group: test_group | ||
infra: | ||
- name: testInfra | ||
stages: | ||
- testing | ||
commit: | ||
- test_version | ||
- group: root | ||
infra: | ||
- name: testInfra | ||
stages: | ||
- testing | ||
- prod | ||
- locked | ||
commit: | ||
- test_version | ||
allow_limit: False |