-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
executable file
·78 lines (61 loc) · 1.86 KB
/
Justfile
File metadata and controls
executable file
·78 lines (61 loc) · 1.86 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Variables
venv := "~/venv/ansible-ricochet"
venv_env := "VIRTUAL_ENV=" + venv + " PATH=" + venv + "/bin:$PATH"
lint:
ansible-lint
ansible-doctor:
{{ venv_env }} ansible-doctor --version && \
{{ venv_env }} ansible-doctor roles -vvv -r -f && \
find roles -name README.md -exec sed -i '' '/<generator object/d' {} \; && \
prettier -w .
galaxy-publish:
ansible-galaxy collection build && \
tarball=$(ls | grep devxy-) && \
ansible-galaxy collection install $tarball -p /Users/pjs/.ansible/collections && \
ansible-galaxy collection publish $tarball && \
rm $tarball
galaxy-build:
{{ venv_env }} ansible-galaxy collection build -f -vvv
init-venv:
uv venv --python 3.12 {{ venv }} && \
uv pip install --python {{ venv }}/bin/python \
ansible-doctor[ansible-core] \
molecule-plugins[docker] \
cryptography \
distlib
# Molecule testing
molecule-test role distro="alma9":
cd roles/{{ role }} && \
{{ venv_env }} MOLECULE_DISTRO={{ distro }} molecule test
molecule-converge role distro="alma9":
cd roles/{{ role }} && \
{{ venv_env }} MOLECULE_DISTRO={{ distro }} molecule converge
molecule-verify role:
cd roles/{{ role }} && \
{{ venv_env }} molecule verify
molecule-destroy role:
cd roles/{{ role }} && \
{{ venv_env }} molecule destroy
molecule-login role:
cd roles/{{ role }} && \
{{ venv_env }} molecule login
# Role-specific test shortcuts
test-rhel:
just molecule-test configure_rhel
test-docker:
just molecule-test docker
test-certbot:
just molecule-test certbot
test-node-exporter:
just molecule-test node_exporter
test-restic:
just molecule-test restic
test-ricochet:
just molecule-test ricochet
test-all:
just test-rhel
just test-docker
just test-certbot
just test-node-exporter
just test-restic
just test-ricochet