UNPKG

@installdoc/ansible-gas-station

Version:

An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤

43 lines (39 loc) 1.26 kB
--- version: '3' tasks: load:custom-engines: deps: - :install:software:docker - :install:software:jq - :install:software:yq env: CUSTOM_ENGINES: sh: yq e -o=j '.' .codeclimate.yml | jq -r '.plugins | keys[]' cmds: - | function dockerGet() { if ! docker images {{.DOCKERHUB_PROFILE}}/$1 | grep ' slim-codeclimate ' > /dev/null; then docker pull "{{.DOCKERHUB_PROFILE}}/$1:slim-codeclimate" fi docker tag "{{.DOCKERHUB_PROFILE}}/$1:slim-codeclimate" "codeclimate/codeclimate-$1:latest" } for ENGINE in $CUSTOM_ENGINES; do if [ "$(yq e -o=j '.' .codeclimate.yml | jq --arg engine $ENGINE -r '.plugins[$engine].enabled')" == 'true' ]; then dockerGet "$ENGINE" & fi done wait taskfiles:add: cmds: - rm -rf .config - cp -rf ../../.config .config - cp ../../start.sh start.sh - cp ../../Taskfile.yml Taskfile.yml - cp ../../package.json package.json status: - '[ -z "$CODECLIMATE_INTEGRATION_TEST" ]' taskfiles:remove: cmds: - rm -rf .config start.sh Taskfile.yml package.json status: - '[ -z "$CODECLIMATE_INTEGRATION_TEST" ]'