forked from ansible-lockdown/RHEL9-CIS
makefile tested
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
5bcb791647
commit
95e574343a
1 changed files with 25 additions and 4 deletions
29
Makefile
Normal file → Executable file
29
Makefile
Normal file → Executable 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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue