-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (20 loc) · 981 Bytes
/
Makefile
File metadata and controls
27 lines (20 loc) · 981 Bytes
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
# Set tags to all, if it's not defined
tags ?= all
extra_vars ?=
parallel ?= 1
check: FORCE
ansible-playbook playbooks/openwrt/playbook.yaml -e "@.env" -i inventory/openwrt/hosts.ini --tags "$(tags)" --check --limit "$(limit)" $(extra_vars) -e "parallel=$(parallel)"
diff: FORCE
ansible-playbook playbooks/openwrt/playbook.yaml -e "@.env" -i inventory/openwrt/hosts.ini --tags "$(tags)" --check --diff --limit "$(limit)" $(extra_vars) -e "parallel=$(parallel)"
run: FORCE
ansible-playbook playbooks/openwrt/playbook.yaml -e "@.env" -i inventory/openwrt/hosts.ini --tags "$(tags)" --limit "$(limit)" $(extra_vars) -e "parallel=$(parallel)"
clean: FORCE
@git clean -fXd
info: FORCE
@ansible all --list-hosts -i inventory/openwrt/hosts.ini
@echo "\n Tags of the Roles and conditions (if any)"
@grep 'role:' playbooks/openwrt/playbook.yaml | \
sed -nE "s/.*tags: '([^']*)'(, when: ([^}]*))?.*/\1 \3/p" | \
sed 's/ \([^ ]\)/\t\t\twhen: \1/' | \
sed 's/^/ /'
FORCE: