diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38b9dfa..c203429 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,13 +61,20 @@ Test: Play_Against_Remote: stage: play script: - - ansible-playbook -l '!tags_home' site.yml --ssh-common-args='-o ProxyCommand="ssh -W %h:%p -q ansible@bastion1.dallas.mgmt.desu.ltd"' --vault-password-file /vaultpw || error="$?" + - ansible-playbook --skip-tags no-auto -l '!tags_home' site.yml --ssh-common-args='-o ProxyCommand="ssh -W %h:%p -q ansible@bastion1.dallas.mgmt.desu.ltd"' --vault-password-file /vaultpw || error="$?" - if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi - if [ -n "$error" ]; then echo "Return code $error"; false; fi Play_Against_Home: stage: play retry: 1 script: - - ansible-playbook -l tags_home site.yml --ssh-common-args='-o ProxyCommand="ssh -W %h:%p -q ansible@bastion1.dallas.mgmt.desu.ltd"' --vault-password-file /vaultpw || error="$?" + - ansible-playbook --skip-tags no-auto -l tags_home site.yml --ssh-common-args='-o ProxyCommand="ssh -W %h:%p -q ansible@bastion1.dallas.mgmt.desu.ltd"' --vault-password-file /vaultpw || error="$?" + - if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi + - if [ -n "$error" ]; then echo "Return code $error"; false; fi +Play_Nagios: + stage: play + retry: 1 + script: + - ansible-playbook -l web3.dallas.mgmt.desu.ltd playbooks/prod_web.yml --tags nagios --ssh-common-args='-o ProxyCommand="ssh -W %h:%p -q ansible@bastion1.dallas.mgmt.desu.ltd"' --vault-password-file /vaultpw || error="$?" - if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi - if [ -n "$error" ]; then echo "Return code $error"; false; fi diff --git a/playbooks/prod_web.yml b/playbooks/prod_web.yml index 61bf43c..76a10c7 100755 --- a/playbooks/prod_web.yml +++ b/playbooks/prod_web.yml @@ -320,7 +320,7 @@ - name: Unit zerotier-one.service command: check_by_ssh!/usr/local/bin/monitoring-scripts/check_systemd_unit zerotier-one.service hostgroup: tag-zt-personal - tags: [ nagios ] + tags: [ nagios, no-auto ] - role: ingress vars: ingress_servers: