From c09b46aac08d78b44c91b02f8f16b9b546c96b6a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 15 Jun 2020 13:21:52 +0100 Subject: [PATCH] Stop moving into `ansible/` before running things Makes life easier --- ansible/yamllint.yml | 4 ++-- scripts/ansible/lint.sh | 8 +++----- scripts/ansible/setup.sh | 6 ++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ansible/yamllint.yml b/ansible/yamllint.yml index 9c03796..91959fc 100644 --- a/ansible/yamllint.yml +++ b/ansible/yamllint.yml @@ -1,8 +1,8 @@ extends: default ignore: | - galaxy_roles - group_vars/all/hosts.yml + ansible/galaxy_roles + ansible/group_vars/all/hosts.yml rules: document-start: disable diff --git a/scripts/ansible/lint.sh b/scripts/ansible/lint.sh index 7480e92..64a9dc5 100755 --- a/scripts/ansible/lint.sh +++ b/scripts/ansible/lint.sh @@ -4,12 +4,10 @@ set -e PATH=${PWD}/env/bin:${PATH} -cd ansible/ - set -x -yamllint -sc yamllint.yml . +yamllint -sc ansible/yamllint.yml ansible/ -ansible-lint main.yml -p -c .ansible-lint --exclude galaxy_roles/ +ansible-lint ansible/main.yml -p -c ansible/.ansible-lint --exclude ansible/galaxy_roles/ -ansible-playbook main.yml --syntax-check +cd ansible/ && ansible-playbook main.yml --syntax-check diff --git a/scripts/ansible/setup.sh b/scripts/ansible/setup.sh index eeb0ba6..e819468 100755 --- a/scripts/ansible/setup.sh +++ b/scripts/ansible/setup.sh @@ -8,8 +8,6 @@ set -x python -m venv env -cd ansible/ +pip install -r ansible/dev-requirements.txt -pip install -r dev-requirements.txt - -ansible-galaxy install -r galaxy-requirements.yml +cd ansible/ && ansible-galaxy install -r galaxy-requirements.yml