4
0
Fork 0

makefile tested

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2023-01-23 16:07:59 +00:00
parent 5bcb791647
commit 95e574343a
No known key found for this signature in database
GPG key ID: 1DE02A772D0908F9

29
Makefile Normal file → Executable file
View file

@ -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: yamllint:
git ls-files "*.yml"|xargs yamllint git ls-files "*.yml"|xargs yamllint
requirements: pip-requirements:
@echo 'Python dependencies:' @echo 'Python dependencies:'
@cat requirements.txt @cat requirements.txt
pip install -r requirements.txt $(ANSIBLE_LINT) install -r requirements.txt