From bd9b3beb63edcfc70c2a36cdab79b5af1ca8313c Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Tue, 29 Nov 2022 00:59:48 +0100 Subject: [PATCH] Check dependencies for run, syntax-check and dry-run --- Makefile | 10 +++++----- README.md | 9 +++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 README.md diff --git a/Makefile b/Makefile index 7dcadbc..2e8b784 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ inventory: $(ansible_req): -deps: $(ansible_req) +deps: $(ansible_req) $(venv_source)/dep $(shell mkdir -p $(ansible_roles)) ifeq ($(wildcard $(ansible_req)),) $(error there is not requirements.yml file in $(ansible_data)!) @@ -29,18 +29,18 @@ endif --role-file="$(ansible_req)" .PHONY: check-syntax -check-syntax: ## check-syntax #Check playbook syntax +check-syntax: deps $(venv_cmd) && ansible-playbook -i inventory.ini \ --syntax-check $(ansible_playbook) .PHONY: dry-run -dry-run: ## dry-run #run playbook in check mode +dry-run: deps $(venv_cmd) && ansible-playbook -i inventory.ini \ --check $(ansible_options) $(ansible_playbook) \ -u $(ansible_user) -.PHONY: dry-run -run: ## dry-run #run playbook in check mode +.PHONY: run +run: deps $(venv_cmd) && ansible-playbook -i inventory.ini \ $(ansible_options) $(ansible_playbook) \ -u $(ansible_user) diff --git a/README.md b/README.md new file mode 100644 index 0000000..2eafbbb --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +Desktop configuration playbook +------------------------------ + +This repo contais all needed to install and configure my Windows managers and +associated services. + +## How-to + +Just run `make dry-run` or `make run`