FicListYaml = $(shell find . -type f -iname "*.yml" -not -iname "mdp.yml") FicListPlayBook = $(shell echo play*.yml) check: check-yaml check-ansible # Check YAML syntax check-yaml: for Fic in $(FicListYaml); do \ ansible-lint "$$Fic" || break ; \ done check-ansible: for Fic in $(FicListPlayBook); do \ ansible-playbook --check "$$Fic" || break ; \ done apply: for Fic in $(FicListPlayBook); do \ ansible-playbook "$$Fic" || break ; \ done # Check idempotent check-active: $(eval changed := $(shell ansible-playbook play-fi.yml |tail -2 |sed -e 's/^.*changed=\([0-9][0-9]*\).*/\1/')) @if [ "$(changed)" != "0" ]; then\ echo "ERR NO idempostent";\ false ;\ fi clean: rm -f *.retry vagrant destroy -f build: vagrant up --provider=docker status: vagrant global-status docker ps