Loading .gitignore +5 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ !.gitignore !.gitlab-ci.yml !deploy.yml !ansible.cfg !README.md !run.sh !setup.sh !deploy.yml !requirements.yml .gitlab-ci.yml +17 −7 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ variables: ## PIPELINE DEFINITION stages: - check - shellcheck - ansible-lint ########################################################################################################## Loading @@ -18,18 +19,27 @@ stages: variables: GIT_DEPTH: 1 ANSIBLE_FORCE_COLOR: "True" except: - /^master$/ before_script: - chmod -R o-w ../ ########################################################################################################## ### TEST SECTION test: shellcheck: <<: *common stage: shellcheck image: registry.cyberbrain.pw/tools/shellcheck script: - shellcheck -s sh setup.sh - shellcheck -s sh -e SC2068 run.sh ansible-lint: <<: *common stage: check stage: ansible-lint image: registry.cyberbrain.pw/ansible/ansible except: - /^master$/ script: - test -r requirements.yml && ansible-galaxy install -r requirements.yml - ansible-lint -v -x '204' -x '305' -x '401' deploy.yml - sh setup.sh - find . -maxdepth 1 -mindepth 1 -name \*.yml -a -not -name requirements.yml -a -not -name .gitlab-ci.yml -type f -print0 | xargs -0 ansible-lint ${ANSIBLE_LINT_PARAMETERS} ansible.cfg 0 → 100644 +9 −0 Original line number Diff line number Diff line [defaults] transport = ssh timeout = 45 [privilege_escalation] become=True become_method=sudo become_user=root become_ask_pass=False run.sh 0 → 100644 +3 −0 Original line number Diff line number Diff line #!/usr/bin/env sh ANSIBLE_CONFIG="$(dirname "$0")/ansible.cfg" ansible-playbook $@ setup.sh 0 → 100644 +3 −0 Original line number Diff line number Diff line #!/usr/bin/env sh ansible-galaxy install -r "$(dirname "$0")/requirements.yml" Loading
.gitignore +5 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ !.gitignore !.gitlab-ci.yml !deploy.yml !ansible.cfg !README.md !run.sh !setup.sh !deploy.yml !requirements.yml
.gitlab-ci.yml +17 −7 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ variables: ## PIPELINE DEFINITION stages: - check - shellcheck - ansible-lint ########################################################################################################## Loading @@ -18,18 +19,27 @@ stages: variables: GIT_DEPTH: 1 ANSIBLE_FORCE_COLOR: "True" except: - /^master$/ before_script: - chmod -R o-w ../ ########################################################################################################## ### TEST SECTION test: shellcheck: <<: *common stage: shellcheck image: registry.cyberbrain.pw/tools/shellcheck script: - shellcheck -s sh setup.sh - shellcheck -s sh -e SC2068 run.sh ansible-lint: <<: *common stage: check stage: ansible-lint image: registry.cyberbrain.pw/ansible/ansible except: - /^master$/ script: - test -r requirements.yml && ansible-galaxy install -r requirements.yml - ansible-lint -v -x '204' -x '305' -x '401' deploy.yml - sh setup.sh - find . -maxdepth 1 -mindepth 1 -name \*.yml -a -not -name requirements.yml -a -not -name .gitlab-ci.yml -type f -print0 | xargs -0 ansible-lint ${ANSIBLE_LINT_PARAMETERS}
ansible.cfg 0 → 100644 +9 −0 Original line number Diff line number Diff line [defaults] transport = ssh timeout = 45 [privilege_escalation] become=True become_method=sudo become_user=root become_ask_pass=False
run.sh 0 → 100644 +3 −0 Original line number Diff line number Diff line #!/usr/bin/env sh ANSIBLE_CONFIG="$(dirname "$0")/ansible.cfg" ansible-playbook $@
setup.sh 0 → 100644 +3 −0 Original line number Diff line number Diff line #!/usr/bin/env sh ansible-galaxy install -r "$(dirname "$0")/requirements.yml"