forked from sijans/Wilddiebe10
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (64 loc) · 2.85 KB
/
Makefile
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
79
80
#
# Makefile to handle ansible runs and syntax tests
#
#
# Author: Sascha Girrulat <[email protected]>
#
#
DEST='docs/includes/appendix/ansible.tex'
all: anhang
ansible:
cd ansible; make
anhang: clean anhang-prepare ls-testcases ls-ansible-roles ls-present-groups ls-present-users ls-allowed-ports ls-hosts-entrys
cat $(DEST)
anhang-prepare:
echo '\section{Ansible}' > $(DEST)
ls-testcases:
echo '\subsection{Testfälle}' >> $(DEST);
echo '\label{subsec:testfaelle}' >> $(DEST);
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.print_item_header()" >> $(DEST);
grep '#' .travis.yml | grep -E '(Check|Run)' | sed 's/#/\&/g' >> $(DEST)
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.print_item_footer()" >> $(DEST);
ls-ansible-roles:
echo '\subsection{Ansible Rollen}' >> $(DEST);
echo '\label{subsec:ansible_rollen}' >> $(DEST);
echo '\subsubsection{Eigene Rollen}' >> $(DEST);
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.print_item_header()" >> $(DEST);
ls ansible/roles | sed 's/^/ \& /g' | sed 's/_/\\_/g' >> $(DEST);
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.print_item_footer()" >> $(DEST);
echo '\subsubsection{Externe Rollen}' >> $(DEST);
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.print_item_header()" >> $(DEST);
ls ansible/vendor | sed 's/^/ \& /g' | sed 's/_/\\_/g' >> $(DEST);
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.print_item_footer()" >> $(DEST);
ls-present-groups:
echo '\subsection{Erzeugte Gruppen}' >> $(DEST)
echo '\label{subsec:erzeugte_gruppen}' >> $(DEST)
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.get_present_groups()" >> $(DEST);
ls-present-users:
echo '\subsection{Erzeugte Benutzer}' >> $(DEST)
echo '\label{subsec:erzeugte_benutzer}' >> $(DEST)
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.get_present_users()" >> $(DEST);
ls-allowed-ports:
echo '\subsection{Firewall}' >> $(DEST)
echo '\label{subsec:firewall}' >> $(DEST)
echo '\subsubsection{Offene Ports - Gruppe Nord}' >> $(DEST)
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.get_allowed_tcp_ports('ansible/group_vars/file_server_nord/public')" >> $(DEST);
echo '\subsubsection{Offene Ports - Gruppe Sued}' >> $(DEST)
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.get_allowed_tcp_ports('ansible/group_vars/file_server_sued/public')" >> $(DEST);
ls-hosts-entrys:
echo '\subsection{Einträge /etc/hosts}' >> $(DEST)
echo '\label{subsec:hosts}' >> $(DEST)
/usr/bin/env python2 -c "import scripts.anhang as anhang; anhang.get_hosts_entrys('ansible/group_vars/all')" >> $(DEST);
clean:
rm -f $(DEST)
update:
git submodule update --init
docs:
cd docs; make docs
pdf:
cd docs; make pdf
test:
cd ansible; make test
syntax-checks:
cd ansible; make syntax-checks
.PHONY: docs clean