-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (38 loc) · 1.44 KB
/
Makefile
File metadata and controls
50 lines (38 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.PHONY: lint test test-debian11 test-debian12 test-ubuntu2004 test-ubuntu2204 test-ubuntu2404 test-all clean distclean
VENV := .venv
BIN := $(VENV)/bin
export PATH := $(CURDIR)/$(BIN):$(PATH)
$(VENV): requirements-dev.txt
python3 -m venv $(VENV)
$(BIN)/pip install --upgrade pip
$(BIN)/pip install -r requirements-dev.txt
@touch $(VENV)
lint: $(VENV)
$(BIN)/yamllint -c .yamllint defaults tasks vars meta handlers templates
$(BIN)/ansible-lint -c .ansible-lint defaults tasks vars meta handlers
test: lint test-all
test-debian11: $(VENV)
MOLECULE_OS=debian MOLECULE_VERSION=11 \
MOLECULE_IMAGE=geerlingguy/docker-debian11-ansible:latest \
$(BIN)/molecule test
test-debian12: $(VENV)
MOLECULE_OS=debian MOLECULE_VERSION=12 \
MOLECULE_IMAGE=geerlingguy/docker-debian12-ansible:latest \
$(BIN)/molecule test
test-ubuntu2004: $(VENV)
MOLECULE_OS=ubuntu MOLECULE_VERSION=2004 \
MOLECULE_IMAGE=geerlingguy/docker-ubuntu2004-ansible:latest \
$(BIN)/molecule test
test-ubuntu2204: $(VENV)
MOLECULE_OS=ubuntu MOLECULE_VERSION=2204 \
MOLECULE_IMAGE=geerlingguy/docker-ubuntu2204-ansible:latest \
$(BIN)/molecule test
test-ubuntu2404: $(VENV)
MOLECULE_OS=ubuntu MOLECULE_VERSION=2404 \
MOLECULE_IMAGE=geerlingguy/docker-ubuntu2404-ansible:latest \
$(BIN)/molecule test
test-all: test-debian11 test-debian12 test-ubuntu2004 test-ubuntu2204 test-ubuntu2404
clean:
$(BIN)/molecule destroy 2>/dev/null || true
distclean: clean
rm -rf $(VENV)