-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathraspberrypi-pihole.yaml
124 lines (101 loc) · 3.03 KB
/
raspberrypi-pihole.yaml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
- hosts: "local"
vars_files:
- "../vars/global-vars.yaml"
- "../vars/raspberry-pi.yaml"
# roles:
tasks:
# run zshenv and print out all env in the shell
# store the output to a register
# this will be used in tasks when using the env. no need to run zshenv before running ansible-playbook
#
# obtained from
# https://stackoverflow.com/a/74932715/3053548
- name: source zshenv
shell:
cmd: source ../tools/zsh/.zshenv; env
register: out
changed_when: false
tags: always
# extract the envs and store them as a dictionary
- name: store zshenv as fact
set_fact:
zshenv: "{{ dict( out.stdout.splitlines() | map('split', '=', 1) ) }}"
changed_when: false
tags: always
# ------------------------------------------------------------------------------------------- #
- name: "print env"
debug:
msg: "{{ zshenv }}"
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/raspberry-pi-configs.yaml"
tags:
- raspberry-pi-configs
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/raspberry-pi-apt-sources.yaml"
tags:
- raspberry-pi-apt-sources
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/raspberry-pi-apt.yaml"
tags:
- raspberry-pi-apt
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/raspberry-pi-unattended-upgrades.yaml"
tags:
- raspberry-pi-unattended-upgrades
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/git.yaml"
tags:
- git
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/neofetch.yaml"
tags:
- neofetch
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/zsh.yaml"
tags:
- zsh
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/ohmyzsh.yaml"
tags:
- ohmyzsh
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/nvm.yaml"
tags:
- nvm
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/npm.yaml"
tags:
- npm
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/spacevim.yaml"
tags:
- spacevim
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/neovim-source-build.yaml"
tags:
- neovim-source-build
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/pihole.yaml"
tags:
- pihole
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/unbound.yaml"
tags:
- unbound
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/raspberry-pi-ufw-pihole.yaml"
tags:
- pihole-ufw
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/pihole-cron.yaml"
tags:
- pihole-cron
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/fail2ban.yaml"
tags:
- fail2ban
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/sshd.yaml"
tags:
- sshd
- terminal