Fix indentation

parent 6aaa5134
Pipeline #8492 failed
......@@ -4,7 +4,7 @@ cache:
key: ${CI_COMMIT_REF_SLUG}
stages:
- test
- test
variables:
MIRROR_VALUES_FILE: tests/triumf-mirror-values.yml
......@@ -13,28 +13,26 @@ centos7_test_install:
stage: test
image: centos:centos7
before_script:
- |
yum -y update && yum -y install ansible git
echo "localhost" > tests/inventory
mkdir -p tests/roles
ln -s $(pwd) tests/roles/nagios-nrpe-agent
- yum -y update && yum -y install ansible git sudo
- echo "localhost" > tests/inventory
- mkdir -p tests/roles
- ln -s $(pwd) tests/roles/nagios-nrpe-agent
after_script:
- rm -rf tests/roles
- rm -f $MIRROR_VALUES_FILE
- rm -rf tests/roles
- rm -f $MIRROR_VALUES_FILE
script:
- |
set -ex
- set -ex
# Basic role syntax check
ansible-galaxy install --force --role-file=requirements.yml
ansible-playbook --list-hosts tests/test-playbook.yml --inventory tests/inventory --connection local
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --syntax-check
- [ -f requirements.yml ] && ansible-galaxy install --force --role-file=requirements.yml
- ansible-playbook --list-hosts tests/test-playbook.yml --inventory tests/inventory --connection local
- ansible-playbook tests/test-playbook.yml --inventory tests/inventory --syntax-check
# Run the first time
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
- ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
- >
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- >
ansible-playbook tests/test-playbook.yml --inventory tests/inventory --connection local --extra-vars @${MIRROR_VALUES_FILE}
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment