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 ⛽🔥🤤

34 lines (33 loc) 973 B
--- lint:ansible: stage: lint image: name: megabytelabs/ansible-lint:slim entrypoint: [''] rules: - if: $DO_CI == 'false' when: never - if: $CI_COMMIT_BRANCH == 'synchronize' when: never - exists: - ansible.cfg - meta/main.yml needs: [] variables: GIT_DEPTH: 1 script: - set -eo pipefail - mkdir -p ~/.ansible/roles - | if [ -f main.yml ]; then BASE_DIR="$PWD" find ./roles -mindepth 2 -maxdepth 2 -type d -print0 | while read -d $'\0' ROLE_PATH; do ROLE_BASENAME=$(basename "$ROLE_PATH") if [ ! -d "$HOME/.ansible/roles/${ANSIBLE_GALAXY_USERNAME_PREFIX}${ROLE_BASENAME}" ]; then ln -sf "$BASE_DIR/$ROLE_PATH" "$HOME/.ansible/roles/${ANSIBLE_GALAXY_USERNAME_PREFIX}${ROLE_BASENAME}" fi done else ln -s . ~/.ansible/roles/"${ANSIBLE_GALAXY_USERNAME_PREFIX}$(basename $PWD)" fi - ansible-lint --offline