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 @@
],
"settings": {
"files.associations": {
"**/ansible/requirements.in/*.txt": "pip-requirements",
"ansible/requirements.*.txt": "pip-requirements",
"**/defaults/**/*": "ansible",
"**/tasks/**/*.yml": "ansible",
"**/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"
"**/ansible/requirements*.in": "pip-requirements",
"**/ansible/requirements*.txt": "pip-requirements",
"**/ansible/*/*/*.yml": "ansible",
"**/ansible/inventories/*/hosts": "ini",
},
"python.pythonPath": "/home/code/pyvenv/bin/python",
"python.formatting.provider": "black",
......
SHELL := /bin/bash
DOCKER_IMAGE_NAME := registry.ubicast.net/mediaserver/envsetup
VENV := /tmp/pyvensetup
ANSIBLE_CONFIG := ansible/ansible.cfg
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)
ANSIBLE_BIN = $(shell command -v ansible || command -v $(VENV)/bin/ansible)
......@@ -39,7 +40,7 @@ venv:
install: venv
$(PIP_BIN) install -U pip wheel
$(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
......@@ -54,7 +55,7 @@ install-dev: install
lint:
$(FLAKE8_BIN) .
$(YAMLLINT_BIN) .
$(ANSIBLE_LINT_BIN) ansible/playbooks/site.yml
ANSIBLE_CONFIG=$(ANSIBLE_CONFIG) $(ANSIBLE_LINT_BIN) ansible/playbooks/site.yml
.PHONY: test
## test: Run development tests on the project : debug=1, keep=1, SKYREACH_SYSTEM_KEY=<xxx>
......@@ -76,8 +77,8 @@ endif
ifndef t
$(eval t=all)
endif
$(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_BIN) -i $(i) -l $(l) -m ping all
ANSIBLE_CONFIG=$(ANSIBLE_CONFIG) $(ANSIBLE_PLAYBOOK_BIN) -i $(i) playbooks/site.yml -e conf_update=true -l $(l) -t $(t)
.PHONY: image-validate
## 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