File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11.DEFAULT_GOAL := help
2+ # TODO: test oneshell target (https://www.gnu.org/software/make/manual/html_node/One-Shell.html)
23.ONESHELL :
34export SHELL := $(shell which sh)
45# .SHELLFLAGS := -eu -o pipefail -c
@@ -27,6 +28,14 @@ ifeq ($(shell command -v pip >/dev/null 2>&1; echo $$?), 0)
2728 export PIP := $(shell which pip3)
2829endif
2930
31+ ifeq ($(shell command -v ansible >/dev/null 2>&1; echo $$? ) , 0)
32+ export ANSIBLE := $(shell which ansible)
33+ endif
34+
35+ ifeq ($(shell command -v ansible-lint >/dev/null 2>&1; echo $$? ) , 0)
36+ export ANSIBLE_LINT := $(shell which ansible-lint)
37+ endif
38+
3039ifneq (,$(wildcard /etc/os-release) )
3140 include /etc/os-release
3241endif
@@ -107,7 +116,7 @@ pip: python ## install pip
107116
108117ansible : pip # # install ansible
109118 @echo " Installing Ansible..."
110- if [ " ${UNAME} " == " Darwin" ]; then \
119+ if [ " ${UNAME} " == " Darwin" ] && [ -z " ${ANSIBLE} " ] || [ -z " ${ANSIBLE_LINT} " ] ; then \
111120 brew install ansible ansible-lint; \
112121 else \
113122 python3 -m pip install ansible ansible-lint; \
You can’t perform that action at this time.
0 commit comments