]> arthur.barton.de Git - ansible-collection-boilerplate.git/blobdiff - Makefile.boilerplate
ansible-boilerplate: Only create ".new" files when called with the "init" subcommand
[ansible-collection-boilerplate.git] / Makefile.boilerplate
index 4c4c6d5248afef4b488582b21c6690c55435ecb7..d4697050295e0f0ea72d9a9ba08f86a4805792b2 100644 (file)
@@ -13,8 +13,6 @@ this_dir:=$(shell cd $(dir $(this_makefile_path));pwd)
 check-ansible: $(VENV_BIN)/ansible-lint
 #      Check Ansible executable ...
        "$(VENV_BIN)"/ansible --version
-#      Check YAML files ...
-       "$(VENV_BIN)"/yamllint .
 #      Run ansible-playbook syntax check, when a "site play" is found ...
 ifneq ("$(wildcard playbooks/site.yml)","")
        "$(VENV_BIN)"/ansible-playbook --syntax-check playbooks/site.yml
@@ -30,6 +28,8 @@ distclean-ansible:
        rm -fr "$(SOURCE_ROOT)"/.venv
 #      Remove Ansible Galaxy collections and roles
        rm -fr "$(SOURCE_ROOT)"/ansible_galaxy/ansible_collections "$(SOURCE_ROOT)"/ansible_galaxy/ansible_roles
+#      Try to remove the "ansible_galaxy" directory (if empty), but ignore errors.
+       rmdir "$(SOURCE_ROOT)"/ansible_galaxy || true
 #      Remove cache directory, used by the Ansible "facts cache" for example ...
        rm -fr "$(SOURCE_ROOT)"/.cache
 #      Clean up symlinked commands in dependant projects ...