From fadeb64cb85d260cfc50843f853aff42f151b5be Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 2 Feb 2022 07:46:50 -0600 Subject: [PATCH] Consolidate plays into mutually exclusive and all-encompassing sets --- .gitlab-ci.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33a5412..d592fc7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,17 +52,10 @@ Test: - 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_Desktops: +Play_Against_Remote: stage: play script: - - ansible-playbook -l device_roles_workstation site.yml --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_Production: - stage: play - retry: 1 - script: - - ansible-playbook -l tags_prod site.yml --vault-password-file /vaultpw || error="$?" + - ansible-playbook -l '!tags_home' site.yml --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: