Skip to content

Commit

Permalink
remove tee
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidbell committed Jan 1, 2024
1 parent e705bfe commit 1e81d12
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ jobs:

- name: Test the playbook's idempotence
run: |
output=$(mktemp)
ansible-playbook --inventory ${INVENTORY} site.yml | tee ${output}
# output=$(mktemp)
# ansible-playbook --inventory ${INVENTORY} site.yml | tee ${output}
ansible-playbook --inventory ${INVENTORY} site.yml > ansible_output
set +e
anything_changed=$(tail ${output} | grep -q 'changed=0.*failed=0'; echo $?)
anything_changed=$(tail ansible_output | grep -q 'changed=0.*failed=0'; echo $?)
set -e
echo "anything_changed: [${anything_changed}]" >> $GITHUB_OUTPUT
echo "anything_changed: ${anything_changed}" >> $GITHUB_OUTPUT
if [[ "${anything_changed}" -gt 0 ]]; then
echo "Playbook not idempotent!" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 1e81d12

Please sign in to comment.