From 95e574343a14709d9431578fe4116c7d70fc0b42 Mon Sep 17 00:00:00 2001 From: Mark Bolwell Date: Mon, 23 Jan 2023 16:07:59 +0000 Subject: [PATCH] makefile tested Signed-off-by: Mark Bolwell --- Makefile | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) mode change 100644 => 100755 Makefile 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 +