diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 46a81d1..24e9763 --- a/Makefile +++ b/Makefile @@ -1,11 +1,32 @@ -# TESTS +.PHONY: all galaxy-install ansible-list yamllint pip-requirements help -all: yamllint + +GALAXY=ansible-galaxy +ANSIBLE_LINT=ansible-lint +ANSIBLE_FILE=site.yml + +all: help + +help: + @echo "Make command examples for Ansible" + @echo "Command for assisting with ansible setup" + @echo " galaxy-install to install roles using ansible-galaxy" + @echo " ansible-lint to lint playbook files" + @echo " yamllint to lint playbook files" + @echo " pip-requirements add pip required file" + + +galaxy-install: + $(GALAXY) install -r ./collections/requirements.yml + +ansible-lint: + $(ANSIBLE-LINT) $(ANSIBLE_FILE) yamllint: git ls-files "*.yml"|xargs yamllint -requirements: +pip-requirements: @echo 'Python dependencies:' @cat requirements.txt - pip install -r requirements.txt + $(ANSIBLE_LINT) install -r requirements.txt +