2023-01-23 16:07:59 +00:00
|
|
|
.PHONY: all galaxy-install ansible-list yamllint pip-requirements help
|
2023-01-13 14:18:34 +00:00
|
|
|
|
2023-01-23 16:07:59 +00:00
|
|
|
|
|
|
|
|
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)
|
2023-01-13 14:18:34 +00:00
|
|
|
|
|
|
|
|
yamllint:
|
|
|
|
|
git ls-files "*.yml"|xargs yamllint
|
|
|
|
|
|
2023-01-23 16:07:59 +00:00
|
|
|
pip-requirements:
|
2023-01-13 14:18:34 +00:00
|
|
|
@echo 'Python dependencies:'
|
|
|
|
|
@cat requirements.txt
|
2023-01-23 16:07:59 +00:00
|
|
|
$(ANSIBLE_LINT) install -r requirements.txt
|
|
|
|
|
|