diff --git a/Makefile b/Makefile index 1d592a1..e504d2c 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ PWD=$(shell pwd) ROLE_NAME=weareinteractive.apache2 ROLE_PATH=/etc/ansible/roles/$(ROLE_NAME) TEST_VERSION=ansible --version -TEST_DEPS=ansible-galaxy install -c weareinteractive.apt weareinteractive.openssl weareinteractive.htpasswd +TEST_DEPS=apt-get update && apt-get install -y python3-pip && pip3 install pyopenssl && ansible-galaxy install -c weareinteractive.apt weareinteractive.openssl weareinteractive.htpasswd TEST_SYNTAX=ansible-playbook -v -i 'localhost,' -c local $(ROLE_PATH)/tests/main.yml --syntax-check -TEST_PLAYBOOK=ansible-playbook -vvvv -i 'localhost,' -c local $(ROLE_PATH)/tests/main.yml +TEST_PLAYBOOK=ansible-playbook -vvvv -i 'localhost,' -c local -e 'ansible_python_interpreter=/usr/bin/python3' $(ROLE_PATH)/tests/main.yml TEST_IDEMPOTENT=$(TEST_PLAYBOOK) | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) -TEST_CMD=$(TEST_VERSION); $(TEST_SYNTAX); $(TEST_DEPS); $(TEST_PLAYBOOK); $(TEST_IDEMPOTENT) +TEST_CMD=$(TEST_DEPS); $(TEST_VERSION); $(TEST_SYNTAX); $(TEST_PLAYBOOK); $(TEST_IDEMPOTENT) docs: ansible-role docgen