Skip to content
Snippets Groups Projects
Commit 01fad4fd authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Set ANSIBLE_CONFIG path in ansible commands of Makefile | refs #32734

parent 83d1776b
No related branches found
No related tags found
No related merge requests found
...@@ -16,22 +16,10 @@ ...@@ -16,22 +16,10 @@
], ],
"settings": { "settings": {
"files.associations": { "files.associations": {
"**/ansible/requirements.in/*.txt": "pip-requirements", "**/ansible/requirements*.in": "pip-requirements",
"ansible/requirements.*.txt": "pip-requirements", "**/ansible/requirements*.txt": "pip-requirements",
"**/defaults/**/*": "ansible", "**/ansible/*/*/*.yml": "ansible",
"**/tasks/**/*.yml": "ansible", "**/ansible/inventories/*/hosts": "ini",
"**/handler/*.yml": "ansible",
"**/*_vars/**/*.yml": "ansible",
"**/roles/**/*.yml": "ansible",
"**/role.d/**/*.yml": "ansible",
"**/playbooks/**/*.yml": "ansible",
"**/playbook.d/**/*.yml": "ansible",
"**/*ansible*/**/*.yml": "ansible",
"**/vars/**/*.yml": "ansible",
"**/inventories/**/hosts": "ini",
"**/inventories/**/*": "ansible",
"**/inventory/**/*": "ansible",
"**/inventory.d/**/*": "ansible"
}, },
"python.pythonPath": "/home/code/pyvenv/bin/python", "python.pythonPath": "/home/code/pyvenv/bin/python",
"python.formatting.provider": "black", "python.formatting.provider": "black",
......
SHELL := /bin/bash SHELL := /bin/bash
DOCKER_IMAGE_NAME := registry.ubicast.net/mediaserver/envsetup DOCKER_IMAGE_NAME := registry.ubicast.net/mediaserver/envsetup
VENV := /tmp/pyvensetup VENV := /tmp/pyvensetup
ANSIBLE_CONFIG := ansible/ansible.cfg
PIP_BIN = $(shell command -v $(VENV)/bin/pip3 || command -v pip3 || echo pip3) PIP_BIN = $(shell command -v $(VENV)/bin/pip3 || command -v pip3 || echo pip3)
PIP_COMPILE_BIN = $(shell command -v $(VENV)/bin/pip-compile || command -v pip-compile) PIP_COMPILE_BIN = $(shell command -v $(VENV)/bin/pip-compile || command -v pip-compile)
ANSIBLE_BIN = $(shell command -v ansible || command -v $(VENV)/bin/ansible) ANSIBLE_BIN = $(shell command -v ansible || command -v $(VENV)/bin/ansible)
...@@ -39,7 +40,7 @@ venv: ...@@ -39,7 +40,7 @@ venv:
install: venv install: venv
$(PIP_BIN) install -U pip wheel $(PIP_BIN) install -U pip wheel
$(PIP_BIN) install -r ansible/requirements.txt $(PIP_BIN) install -r ansible/requirements.txt
$(ANSIBLE_GALAXY_BIN) install -r ansible/requirements.yml ANSIBLE_CONFIG=$(ANSIBLE_CONFIG) $(ANSIBLE_GALAXY_BIN) install -r ansible/requirements.yml
.PHONY: install-dev .PHONY: install-dev
...@@ -54,7 +55,7 @@ install-dev: install ...@@ -54,7 +55,7 @@ install-dev: install
lint: lint:
$(FLAKE8_BIN) . $(FLAKE8_BIN) .
$(YAMLLINT_BIN) . $(YAMLLINT_BIN) .
$(ANSIBLE_LINT_BIN) ansible/playbooks/site.yml ANSIBLE_CONFIG=$(ANSIBLE_CONFIG) $(ANSIBLE_LINT_BIN) ansible/playbooks/site.yml
.PHONY: test .PHONY: test
## test: Run development tests on the project : debug=1, keep=1, SKYREACH_SYSTEM_KEY=<xxx> ## test: Run development tests on the project : debug=1, keep=1, SKYREACH_SYSTEM_KEY=<xxx>
...@@ -76,8 +77,8 @@ endif ...@@ -76,8 +77,8 @@ endif
ifndef t ifndef t
$(eval t=all) $(eval t=all)
endif endif
$(ANSIBLE_BIN) -i $(i) -l $(l) -m ping all ANSIBLE_CONFIG=$(ANSIBLE_CONFIG) $(ANSIBLE_BIN) -i $(i) -l $(l) -m ping all
$(ANSIBLE_PLAYBOOK_BIN) -i $(i) ansible/playbooks/site.yml -e conf_update=true -l $(l) -t $(t) ANSIBLE_CONFIG=$(ANSIBLE_CONFIG) $(ANSIBLE_PLAYBOOK_BIN) -i $(i) playbooks/site.yml -e conf_update=true -l $(l) -t $(t)
.PHONY: image-validate .PHONY: image-validate
## image-validate: Check that Packer image is valid : build=<path-to-packer-file> ## image-validate: Check that Packer image is valid : build=<path-to-packer-file>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment