├── .gitignore
├── LICENSE
├── README.md
├── Vagrantfile
├── ansible-playbook.yml
├── ansible.cfg
├── inventories
├── inventory.yml
├── local-inventory.yml
└── vagrant-inventory.yml
├── requirements
└── requirements.yml
├── roles
├── cleanup
│ ├── defaults
│ │ └── main.yml
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── docker
│ ├── defaults
│ │ └── main.yml
│ ├── files
│ │ ├── middlewares.yml
│ │ └── unbound.conf
│ ├── handlers
│ │ └── main.yml
│ ├── tasks
│ │ ├── install-docker.yml
│ │ ├── main.yml
│ │ └── run-docker-compose.yml
│ └── templates
│ │ ├── adguard-conf.yml.j2
│ │ ├── blocky.yml.j2
│ │ ├── docker-compose.yml.j2
│ │ └── traefik.yml.j2
├── packages
│ ├── defaults
│ │ └── main.yml
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
├── update-upgrade
│ ├── defaults
│ │ └── main.yml
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ │ └── main.yml
└── user-management
│ ├── defaults
│ └── main.yml
│ ├── handlers
│ └── main.yml
│ ├── tasks
│ └── main.yml
│ └── templates
│ └── files
│ └── .gitconfig.j2
├── ssh-keys
└── username.key.pub
├── tests
└── vagrant-keys
│ ├── vagrant.pub
│ └── vagrant_key
└── vars
├── clamav.yml
├── docker.yml
├── firewall.yml
├── ntp.yml
├── packages.yml
├── security.yml
├── selinux.yml
├── user-management.yml
└── zsh-antigen.yml
/.gitignore:
--------------------------------------------------------------------------------
1 | .vagrant/
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU AFFERO GENERAL PUBLIC LICENSE
2 | Version 3, 19 November 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU Affero General Public License is a free, copyleft license for
11 | software and other kinds of works, specifically designed to ensure
12 | cooperation with the community in the case of network server software.
13 |
14 | The licenses for most software and other practical works are designed
15 | to take away your freedom to share and change the works. By contrast,
16 | our General Public Licenses are intended to guarantee your freedom to
17 | share and change all versions of a program--to make sure it remains free
18 | software for all its users.
19 |
20 | When we speak of free software, we are referring to freedom, not
21 | price. Our General Public Licenses are designed to make sure that you
22 | have the freedom to distribute copies of free software (and charge for
23 | them if you wish), that you receive source code or can get it if you
24 | want it, that you can change the software or use pieces of it in new
25 | free programs, and that you know you can do these things.
26 |
27 | Developers that use our General Public Licenses protect your rights
28 | with two steps: (1) assert copyright on the software, and (2) offer
29 | you this License which gives you legal permission to copy, distribute
30 | and/or modify the software.
31 |
32 | A secondary benefit of defending all users' freedom is that
33 | improvements made in alternate versions of the program, if they
34 | receive widespread use, become available for other developers to
35 | incorporate. Many developers of free software are heartened and
36 | encouraged by the resulting cooperation. However, in the case of
37 | software used on network servers, this result may fail to come about.
38 | The GNU General Public License permits making a modified version and
39 | letting the public access it on a server without ever releasing its
40 | source code to the public.
41 |
42 | The GNU Affero General Public License is designed specifically to
43 | ensure that, in such cases, the modified source code becomes available
44 | to the community. It requires the operator of a network server to
45 | provide the source code of the modified version running there to the
46 | users of that server. Therefore, public use of a modified version, on
47 | a publicly accessible server, gives the public access to the source
48 | code of the modified version.
49 |
50 | An older license, called the Affero General Public License and
51 | published by Affero, was designed to accomplish similar goals. This is
52 | a different license, not a version of the Affero GPL, but Affero has
53 | released a new version of the Affero GPL which permits relicensing under
54 | this license.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | TERMS AND CONDITIONS
60 |
61 | 0. Definitions.
62 |
63 | "This License" refers to version 3 of the GNU Affero General Public License.
64 |
65 | "Copyright" also means copyright-like laws that apply to other kinds of
66 | works, such as semiconductor masks.
67 |
68 | "The Program" refers to any copyrightable work licensed under this
69 | License. Each licensee is addressed as "you". "Licensees" and
70 | "recipients" may be individuals or organizations.
71 |
72 | To "modify" a work means to copy from or adapt all or part of the work
73 | in a fashion requiring copyright permission, other than the making of an
74 | exact copy. The resulting work is called a "modified version" of the
75 | earlier work or a work "based on" the earlier work.
76 |
77 | A "covered work" means either the unmodified Program or a work based
78 | on the Program.
79 |
80 | To "propagate" a work means to do anything with it that, without
81 | permission, would make you directly or secondarily liable for
82 | infringement under applicable copyright law, except executing it on a
83 | computer or modifying a private copy. Propagation includes copying,
84 | distribution (with or without modification), making available to the
85 | public, and in some countries other activities as well.
86 |
87 | To "convey" a work means any kind of propagation that enables other
88 | parties to make or receive copies. Mere interaction with a user through
89 | a computer network, with no transfer of a copy, is not conveying.
90 |
91 | An interactive user interface displays "Appropriate Legal Notices"
92 | to the extent that it includes a convenient and prominently visible
93 | feature that (1) displays an appropriate copyright notice, and (2)
94 | tells the user that there is no warranty for the work (except to the
95 | extent that warranties are provided), that licensees may convey the
96 | work under this License, and how to view a copy of this License. If
97 | the interface presents a list of user commands or options, such as a
98 | menu, a prominent item in the list meets this criterion.
99 |
100 | 1. Source Code.
101 |
102 | The "source code" for a work means the preferred form of the work
103 | for making modifications to it. "Object code" means any non-source
104 | form of a work.
105 |
106 | A "Standard Interface" means an interface that either is an official
107 | standard defined by a recognized standards body, or, in the case of
108 | interfaces specified for a particular programming language, one that
109 | is widely used among developers working in that language.
110 |
111 | The "System Libraries" of an executable work include anything, other
112 | than the work as a whole, that (a) is included in the normal form of
113 | packaging a Major Component, but which is not part of that Major
114 | Component, and (b) serves only to enable use of the work with that
115 | Major Component, or to implement a Standard Interface for which an
116 | implementation is available to the public in source code form. A
117 | "Major Component", in this context, means a major essential component
118 | (kernel, window system, and so on) of the specific operating system
119 | (if any) on which the executable work runs, or a compiler used to
120 | produce the work, or an object code interpreter used to run it.
121 |
122 | The "Corresponding Source" for a work in object code form means all
123 | the source code needed to generate, install, and (for an executable
124 | work) run the object code and to modify the work, including scripts to
125 | control those activities. However, it does not include the work's
126 | System Libraries, or general-purpose tools or generally available free
127 | programs which are used unmodified in performing those activities but
128 | which are not part of the work. For example, Corresponding Source
129 | includes interface definition files associated with source files for
130 | the work, and the source code for shared libraries and dynamically
131 | linked subprograms that the work is specifically designed to require,
132 | such as by intimate data communication or control flow between those
133 | subprograms and other parts of the work.
134 |
135 | The Corresponding Source need not include anything that users
136 | can regenerate automatically from other parts of the Corresponding
137 | Source.
138 |
139 | The Corresponding Source for a work in source code form is that
140 | same work.
141 |
142 | 2. Basic Permissions.
143 |
144 | All rights granted under this License are granted for the term of
145 | copyright on the Program, and are irrevocable provided the stated
146 | conditions are met. This License explicitly affirms your unlimited
147 | permission to run the unmodified Program. The output from running a
148 | covered work is covered by this License only if the output, given its
149 | content, constitutes a covered work. This License acknowledges your
150 | rights of fair use or other equivalent, as provided by copyright law.
151 |
152 | You may make, run and propagate covered works that you do not
153 | convey, without conditions so long as your license otherwise remains
154 | in force. You may convey covered works to others for the sole purpose
155 | of having them make modifications exclusively for you, or provide you
156 | with facilities for running those works, provided that you comply with
157 | the terms of this License in conveying all material for which you do
158 | not control copyright. Those thus making or running the covered works
159 | for you must do so exclusively on your behalf, under your direction
160 | and control, on terms that prohibit them from making any copies of
161 | your copyrighted material outside their relationship with you.
162 |
163 | Conveying under any other circumstances is permitted solely under
164 | the conditions stated below. Sublicensing is not allowed; section 10
165 | makes it unnecessary.
166 |
167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168 |
169 | No covered work shall be deemed part of an effective technological
170 | measure under any applicable law fulfilling obligations under article
171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172 | similar laws prohibiting or restricting circumvention of such
173 | measures.
174 |
175 | When you convey a covered work, you waive any legal power to forbid
176 | circumvention of technological measures to the extent such circumvention
177 | is effected by exercising rights under this License with respect to
178 | the covered work, and you disclaim any intention to limit operation or
179 | modification of the work as a means of enforcing, against the work's
180 | users, your or third parties' legal rights to forbid circumvention of
181 | technological measures.
182 |
183 | 4. Conveying Verbatim Copies.
184 |
185 | You may convey verbatim copies of the Program's source code as you
186 | receive it, in any medium, provided that you conspicuously and
187 | appropriately publish on each copy an appropriate copyright notice;
188 | keep intact all notices stating that this License and any
189 | non-permissive terms added in accord with section 7 apply to the code;
190 | keep intact all notices of the absence of any warranty; and give all
191 | recipients a copy of this License along with the Program.
192 |
193 | You may charge any price or no price for each copy that you convey,
194 | and you may offer support or warranty protection for a fee.
195 |
196 | 5. Conveying Modified Source Versions.
197 |
198 | You may convey a work based on the Program, or the modifications to
199 | produce it from the Program, in the form of source code under the
200 | terms of section 4, provided that you also meet all of these conditions:
201 |
202 | a) The work must carry prominent notices stating that you modified
203 | it, and giving a relevant date.
204 |
205 | b) The work must carry prominent notices stating that it is
206 | released under this License and any conditions added under section
207 | 7. This requirement modifies the requirement in section 4 to
208 | "keep intact all notices".
209 |
210 | c) You must license the entire work, as a whole, under this
211 | License to anyone who comes into possession of a copy. This
212 | License will therefore apply, along with any applicable section 7
213 | additional terms, to the whole of the work, and all its parts,
214 | regardless of how they are packaged. This License gives no
215 | permission to license the work in any other way, but it does not
216 | invalidate such permission if you have separately received it.
217 |
218 | d) If the work has interactive user interfaces, each must display
219 | Appropriate Legal Notices; however, if the Program has interactive
220 | interfaces that do not display Appropriate Legal Notices, your
221 | work need not make them do so.
222 |
223 | A compilation of a covered work with other separate and independent
224 | works, which are not by their nature extensions of the covered work,
225 | and which are not combined with it such as to form a larger program,
226 | in or on a volume of a storage or distribution medium, is called an
227 | "aggregate" if the compilation and its resulting copyright are not
228 | used to limit the access or legal rights of the compilation's users
229 | beyond what the individual works permit. Inclusion of a covered work
230 | in an aggregate does not cause this License to apply to the other
231 | parts of the aggregate.
232 |
233 | 6. Conveying Non-Source Forms.
234 |
235 | You may convey a covered work in object code form under the terms
236 | of sections 4 and 5, provided that you also convey the
237 | machine-readable Corresponding Source under the terms of this License,
238 | in one of these ways:
239 |
240 | a) Convey the object code in, or embodied in, a physical product
241 | (including a physical distribution medium), accompanied by the
242 | Corresponding Source fixed on a durable physical medium
243 | customarily used for software interchange.
244 |
245 | b) Convey the object code in, or embodied in, a physical product
246 | (including a physical distribution medium), accompanied by a
247 | written offer, valid for at least three years and valid for as
248 | long as you offer spare parts or customer support for that product
249 | model, to give anyone who possesses the object code either (1) a
250 | copy of the Corresponding Source for all the software in the
251 | product that is covered by this License, on a durable physical
252 | medium customarily used for software interchange, for a price no
253 | more than your reasonable cost of physically performing this
254 | conveying of source, or (2) access to copy the
255 | Corresponding Source from a network server at no charge.
256 |
257 | c) Convey individual copies of the object code with a copy of the
258 | written offer to provide the Corresponding Source. This
259 | alternative is allowed only occasionally and noncommercially, and
260 | only if you received the object code with such an offer, in accord
261 | with subsection 6b.
262 |
263 | d) Convey the object code by offering access from a designated
264 | place (gratis or for a charge), and offer equivalent access to the
265 | Corresponding Source in the same way through the same place at no
266 | further charge. You need not require recipients to copy the
267 | Corresponding Source along with the object code. If the place to
268 | copy the object code is a network server, the Corresponding Source
269 | may be on a different server (operated by you or a third party)
270 | that supports equivalent copying facilities, provided you maintain
271 | clear directions next to the object code saying where to find the
272 | Corresponding Source. Regardless of what server hosts the
273 | Corresponding Source, you remain obligated to ensure that it is
274 | available for as long as needed to satisfy these requirements.
275 |
276 | e) Convey the object code using peer-to-peer transmission, provided
277 | you inform other peers where the object code and Corresponding
278 | Source of the work are being offered to the general public at no
279 | charge under subsection 6d.
280 |
281 | A separable portion of the object code, whose source code is excluded
282 | from the Corresponding Source as a System Library, need not be
283 | included in conveying the object code work.
284 |
285 | A "User Product" is either (1) a "consumer product", which means any
286 | tangible personal property which is normally used for personal, family,
287 | or household purposes, or (2) anything designed or sold for incorporation
288 | into a dwelling. In determining whether a product is a consumer product,
289 | doubtful cases shall be resolved in favor of coverage. For a particular
290 | product received by a particular user, "normally used" refers to a
291 | typical or common use of that class of product, regardless of the status
292 | of the particular user or of the way in which the particular user
293 | actually uses, or expects or is expected to use, the product. A product
294 | is a consumer product regardless of whether the product has substantial
295 | commercial, industrial or non-consumer uses, unless such uses represent
296 | the only significant mode of use of the product.
297 |
298 | "Installation Information" for a User Product means any methods,
299 | procedures, authorization keys, or other information required to install
300 | and execute modified versions of a covered work in that User Product from
301 | a modified version of its Corresponding Source. The information must
302 | suffice to ensure that the continued functioning of the modified object
303 | code is in no case prevented or interfered with solely because
304 | modification has been made.
305 |
306 | If you convey an object code work under this section in, or with, or
307 | specifically for use in, a User Product, and the conveying occurs as
308 | part of a transaction in which the right of possession and use of the
309 | User Product is transferred to the recipient in perpetuity or for a
310 | fixed term (regardless of how the transaction is characterized), the
311 | Corresponding Source conveyed under this section must be accompanied
312 | by the Installation Information. But this requirement does not apply
313 | if neither you nor any third party retains the ability to install
314 | modified object code on the User Product (for example, the work has
315 | been installed in ROM).
316 |
317 | The requirement to provide Installation Information does not include a
318 | requirement to continue to provide support service, warranty, or updates
319 | for a work that has been modified or installed by the recipient, or for
320 | the User Product in which it has been modified or installed. Access to a
321 | network may be denied when the modification itself materially and
322 | adversely affects the operation of the network or violates the rules and
323 | protocols for communication across the network.
324 |
325 | Corresponding Source conveyed, and Installation Information provided,
326 | in accord with this section must be in a format that is publicly
327 | documented (and with an implementation available to the public in
328 | source code form), and must require no special password or key for
329 | unpacking, reading or copying.
330 |
331 | 7. Additional Terms.
332 |
333 | "Additional permissions" are terms that supplement the terms of this
334 | License by making exceptions from one or more of its conditions.
335 | Additional permissions that are applicable to the entire Program shall
336 | be treated as though they were included in this License, to the extent
337 | that they are valid under applicable law. If additional permissions
338 | apply only to part of the Program, that part may be used separately
339 | under those permissions, but the entire Program remains governed by
340 | this License without regard to the additional permissions.
341 |
342 | When you convey a copy of a covered work, you may at your option
343 | remove any additional permissions from that copy, or from any part of
344 | it. (Additional permissions may be written to require their own
345 | removal in certain cases when you modify the work.) You may place
346 | additional permissions on material, added by you to a covered work,
347 | for which you have or can give appropriate copyright permission.
348 |
349 | Notwithstanding any other provision of this License, for material you
350 | add to a covered work, you may (if authorized by the copyright holders of
351 | that material) supplement the terms of this License with terms:
352 |
353 | a) Disclaiming warranty or limiting liability differently from the
354 | terms of sections 15 and 16 of this License; or
355 |
356 | b) Requiring preservation of specified reasonable legal notices or
357 | author attributions in that material or in the Appropriate Legal
358 | Notices displayed by works containing it; or
359 |
360 | c) Prohibiting misrepresentation of the origin of that material, or
361 | requiring that modified versions of such material be marked in
362 | reasonable ways as different from the original version; or
363 |
364 | d) Limiting the use for publicity purposes of names of licensors or
365 | authors of the material; or
366 |
367 | e) Declining to grant rights under trademark law for use of some
368 | trade names, trademarks, or service marks; or
369 |
370 | f) Requiring indemnification of licensors and authors of that
371 | material by anyone who conveys the material (or modified versions of
372 | it) with contractual assumptions of liability to the recipient, for
373 | any liability that these contractual assumptions directly impose on
374 | those licensors and authors.
375 |
376 | All other non-permissive additional terms are considered "further
377 | restrictions" within the meaning of section 10. If the Program as you
378 | received it, or any part of it, contains a notice stating that it is
379 | governed by this License along with a term that is a further
380 | restriction, you may remove that term. If a license document contains
381 | a further restriction but permits relicensing or conveying under this
382 | License, you may add to a covered work material governed by the terms
383 | of that license document, provided that the further restriction does
384 | not survive such relicensing or conveying.
385 |
386 | If you add terms to a covered work in accord with this section, you
387 | must place, in the relevant source files, a statement of the
388 | additional terms that apply to those files, or a notice indicating
389 | where to find the applicable terms.
390 |
391 | Additional terms, permissive or non-permissive, may be stated in the
392 | form of a separately written license, or stated as exceptions;
393 | the above requirements apply either way.
394 |
395 | 8. Termination.
396 |
397 | You may not propagate or modify a covered work except as expressly
398 | provided under this License. Any attempt otherwise to propagate or
399 | modify it is void, and will automatically terminate your rights under
400 | this License (including any patent licenses granted under the third
401 | paragraph of section 11).
402 |
403 | However, if you cease all violation of this License, then your
404 | license from a particular copyright holder is reinstated (a)
405 | provisionally, unless and until the copyright holder explicitly and
406 | finally terminates your license, and (b) permanently, if the copyright
407 | holder fails to notify you of the violation by some reasonable means
408 | prior to 60 days after the cessation.
409 |
410 | Moreover, your license from a particular copyright holder is
411 | reinstated permanently if the copyright holder notifies you of the
412 | violation by some reasonable means, this is the first time you have
413 | received notice of violation of this License (for any work) from that
414 | copyright holder, and you cure the violation prior to 30 days after
415 | your receipt of the notice.
416 |
417 | Termination of your rights under this section does not terminate the
418 | licenses of parties who have received copies or rights from you under
419 | this License. If your rights have been terminated and not permanently
420 | reinstated, you do not qualify to receive new licenses for the same
421 | material under section 10.
422 |
423 | 9. Acceptance Not Required for Having Copies.
424 |
425 | You are not required to accept this License in order to receive or
426 | run a copy of the Program. Ancillary propagation of a covered work
427 | occurring solely as a consequence of using peer-to-peer transmission
428 | to receive a copy likewise does not require acceptance. However,
429 | nothing other than this License grants you permission to propagate or
430 | modify any covered work. These actions infringe copyright if you do
431 | not accept this License. Therefore, by modifying or propagating a
432 | covered work, you indicate your acceptance of this License to do so.
433 |
434 | 10. Automatic Licensing of Downstream Recipients.
435 |
436 | Each time you convey a covered work, the recipient automatically
437 | receives a license from the original licensors, to run, modify and
438 | propagate that work, subject to this License. You are not responsible
439 | for enforcing compliance by third parties with this License.
440 |
441 | An "entity transaction" is a transaction transferring control of an
442 | organization, or substantially all assets of one, or subdividing an
443 | organization, or merging organizations. If propagation of a covered
444 | work results from an entity transaction, each party to that
445 | transaction who receives a copy of the work also receives whatever
446 | licenses to the work the party's predecessor in interest had or could
447 | give under the previous paragraph, plus a right to possession of the
448 | Corresponding Source of the work from the predecessor in interest, if
449 | the predecessor has it or can get it with reasonable efforts.
450 |
451 | You may not impose any further restrictions on the exercise of the
452 | rights granted or affirmed under this License. For example, you may
453 | not impose a license fee, royalty, or other charge for exercise of
454 | rights granted under this License, and you may not initiate litigation
455 | (including a cross-claim or counterclaim in a lawsuit) alleging that
456 | any patent claim is infringed by making, using, selling, offering for
457 | sale, or importing the Program or any portion of it.
458 |
459 | 11. Patents.
460 |
461 | A "contributor" is a copyright holder who authorizes use under this
462 | License of the Program or a work on which the Program is based. The
463 | work thus licensed is called the contributor's "contributor version".
464 |
465 | A contributor's "essential patent claims" are all patent claims
466 | owned or controlled by the contributor, whether already acquired or
467 | hereafter acquired, that would be infringed by some manner, permitted
468 | by this License, of making, using, or selling its contributor version,
469 | but do not include claims that would be infringed only as a
470 | consequence of further modification of the contributor version. For
471 | purposes of this definition, "control" includes the right to grant
472 | patent sublicenses in a manner consistent with the requirements of
473 | this License.
474 |
475 | Each contributor grants you a non-exclusive, worldwide, royalty-free
476 | patent license under the contributor's essential patent claims, to
477 | make, use, sell, offer for sale, import and otherwise run, modify and
478 | propagate the contents of its contributor version.
479 |
480 | In the following three paragraphs, a "patent license" is any express
481 | agreement or commitment, however denominated, not to enforce a patent
482 | (such as an express permission to practice a patent or covenant not to
483 | sue for patent infringement). To "grant" such a patent license to a
484 | party means to make such an agreement or commitment not to enforce a
485 | patent against the party.
486 |
487 | If you convey a covered work, knowingly relying on a patent license,
488 | and the Corresponding Source of the work is not available for anyone
489 | to copy, free of charge and under the terms of this License, through a
490 | publicly available network server or other readily accessible means,
491 | then you must either (1) cause the Corresponding Source to be so
492 | available, or (2) arrange to deprive yourself of the benefit of the
493 | patent license for this particular work, or (3) arrange, in a manner
494 | consistent with the requirements of this License, to extend the patent
495 | license to downstream recipients. "Knowingly relying" means you have
496 | actual knowledge that, but for the patent license, your conveying the
497 | covered work in a country, or your recipient's use of the covered work
498 | in a country, would infringe one or more identifiable patents in that
499 | country that you have reason to believe are valid.
500 |
501 | If, pursuant to or in connection with a single transaction or
502 | arrangement, you convey, or propagate by procuring conveyance of, a
503 | covered work, and grant a patent license to some of the parties
504 | receiving the covered work authorizing them to use, propagate, modify
505 | or convey a specific copy of the covered work, then the patent license
506 | you grant is automatically extended to all recipients of the covered
507 | work and works based on it.
508 |
509 | A patent license is "discriminatory" if it does not include within
510 | the scope of its coverage, prohibits the exercise of, or is
511 | conditioned on the non-exercise of one or more of the rights that are
512 | specifically granted under this License. You may not convey a covered
513 | work if you are a party to an arrangement with a third party that is
514 | in the business of distributing software, under which you make payment
515 | to the third party based on the extent of your activity of conveying
516 | the work, and under which the third party grants, to any of the
517 | parties who would receive the covered work from you, a discriminatory
518 | patent license (a) in connection with copies of the covered work
519 | conveyed by you (or copies made from those copies), or (b) primarily
520 | for and in connection with specific products or compilations that
521 | contain the covered work, unless you entered into that arrangement,
522 | or that patent license was granted, prior to 28 March 2007.
523 |
524 | Nothing in this License shall be construed as excluding or limiting
525 | any implied license or other defenses to infringement that may
526 | otherwise be available to you under applicable patent law.
527 |
528 | 12. No Surrender of Others' Freedom.
529 |
530 | If conditions are imposed on you (whether by court order, agreement or
531 | otherwise) that contradict the conditions of this License, they do not
532 | excuse you from the conditions of this License. If you cannot convey a
533 | covered work so as to satisfy simultaneously your obligations under this
534 | License and any other pertinent obligations, then as a consequence you may
535 | not convey it at all. For example, if you agree to terms that obligate you
536 | to collect a royalty for further conveying from those to whom you convey
537 | the Program, the only way you could satisfy both those terms and this
538 | License would be to refrain entirely from conveying the Program.
539 |
540 | 13. Remote Network Interaction; Use with the GNU General Public License.
541 |
542 | Notwithstanding any other provision of this License, if you modify the
543 | Program, your modified version must prominently offer all users
544 | interacting with it remotely through a computer network (if your version
545 | supports such interaction) an opportunity to receive the Corresponding
546 | Source of your version by providing access to the Corresponding Source
547 | from a network server at no charge, through some standard or customary
548 | means of facilitating copying of software. This Corresponding Source
549 | shall include the Corresponding Source for any work covered by version 3
550 | of the GNU General Public License that is incorporated pursuant to the
551 | following paragraph.
552 |
553 | Notwithstanding any other provision of this License, you have
554 | permission to link or combine any covered work with a work licensed
555 | under version 3 of the GNU General Public License into a single
556 | combined work, and to convey the resulting work. The terms of this
557 | License will continue to apply to the part which is the covered work,
558 | but the work with which it is combined will remain governed by version
559 | 3 of the GNU General Public License.
560 |
561 | 14. Revised Versions of this License.
562 |
563 | The Free Software Foundation may publish revised and/or new versions of
564 | the GNU Affero General Public License from time to time. Such new versions
565 | will be similar in spirit to the present version, but may differ in detail to
566 | address new problems or concerns.
567 |
568 | Each version is given a distinguishing version number. If the
569 | Program specifies that a certain numbered version of the GNU Affero General
570 | Public License "or any later version" applies to it, you have the
571 | option of following the terms and conditions either of that numbered
572 | version or of any later version published by the Free Software
573 | Foundation. If the Program does not specify a version number of the
574 | GNU Affero General Public License, you may choose any version ever published
575 | by the Free Software Foundation.
576 |
577 | If the Program specifies that a proxy can decide which future
578 | versions of the GNU Affero General Public License can be used, that proxy's
579 | public statement of acceptance of a version permanently authorizes you
580 | to choose that version for the Program.
581 |
582 | Later license versions may give you additional or different
583 | permissions. However, no additional obligations are imposed on any
584 | author or copyright holder as a result of your choosing to follow a
585 | later version.
586 |
587 | 15. Disclaimer of Warranty.
588 |
589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597 |
598 | 16. Limitation of Liability.
599 |
600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608 | SUCH DAMAGES.
609 |
610 | 17. Interpretation of Sections 15 and 16.
611 |
612 | If the disclaimer of warranty and limitation of liability provided
613 | above cannot be given local legal effect according to their terms,
614 | reviewing courts shall apply local law that most closely approximates
615 | an absolute waiver of all civil liability in connection with the
616 | Program, unless a warranty or assumption of liability accompanies a
617 | copy of the Program in return for a fee.
618 |
619 | END OF TERMS AND CONDITIONS
620 |
621 | How to Apply These Terms to Your New Programs
622 |
623 | If you develop a new program, and you want it to be of the greatest
624 | possible use to the public, the best way to achieve this is to make it
625 | free software which everyone can redistribute and change under these terms.
626 |
627 | To do so, attach the following notices to the program. It is safest
628 | to attach them to the start of each source file to most effectively
629 | state the exclusion of warranty; and each file should have at least
630 | the "copyright" line and a pointer to where the full notice is found.
631 |
632 |
633 | Copyright (C)
634 |
635 | This program is free software: you can redistribute it and/or modify
636 | it under the terms of the GNU Affero General Public License as published
637 | by the Free Software Foundation, either version 3 of the License, or
638 | (at your option) any later version.
639 |
640 | This program is distributed in the hope that it will be useful,
641 | but WITHOUT ANY WARRANTY; without even the implied warranty of
642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643 | GNU Affero General Public License for more details.
644 |
645 | You should have received a copy of the GNU Affero General Public License
646 | along with this program. If not, see .
647 |
648 | Also add information on how to contact you by electronic and paper mail.
649 |
650 | If your software can interact with users remotely through a computer
651 | network, you should also make sure that it provides a way for users to
652 | get its source. For example, if your program is a web application, its
653 | interface could display a "Source" link that leads users to an archive
654 | of the code. There are many ways you could offer source, and different
655 | solutions will be better for different programs; see section 13 for the
656 | specific requirements.
657 |
658 | You should also get your employer (if you work as a programmer) or school,
659 | if any, to sign a "copyright disclaimer" for the program, if necessary.
660 | For more information on this, and how to apply and follow the GNU AGPL, see
661 | .
662 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ansible-AdGuard Automated setup for online use
2 |
3 | ## Intended Usecase
4 |
5 | This Anible playbook deploys a self updating [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome/) stack based on Docker, featuring:
6 |
7 | - [Unbound](https://nlnetlabs.nl/projects/unbound/about/) as recursive DNS server instead of public upstream DNS servers
8 | - DNS over HTTPS (DoH)
9 | - DNS over TLS (DoT)
10 | - IPv4
11 | - Admin interface over HTTPS
12 | - Automatic SSL certificate for DoH & DoT
13 | - Self-updating, powered by Docker & Watchtower
14 |
15 | ## Disclaimer
16 |
17 | Please do not set up a public DNS resolver, i.e. an AdGuard Home instance facing the internet, if you don't know what you're doing. [You risk getting in all sorts of trouble.](http://openresolverproject.org/) Most ISPs don't allow public DNS resolvers on their networks and will shut you down without notice, because it's generally [a bad idea.](https://community.infoblox.com/t5/Community-Blog/How-Dangerous-Can-An-Open-DNS-Resolver-Be-Part-I/ba-p/4017).
18 |
19 | If all you're looking for is an adblocking DNS service, please consider using [AdGuard's own public DNS service](https://adguard.com/en/adguard-dns/overview.html#instruction) instead.
20 |
21 | ## Prerequisites
22 |
23 | 1. Your Linux server must be reachable over the internet on the following ports:
24 |
25 | - 53 (UDP/TCP) for plain DNS resolution
26 | - 80 (TCP) for ZeroSSL's validation method
27 | - 443 (TCP) for AdGuard Home's webinterface & DoH
28 | - 853 (TCP) for DoT
29 |
30 | 2. You _must_ own a Fully Qualified Domain Name (FQDN), such as yourdomain.com.
31 | This is required to generate a valid SSL Certificate used for DoH & DoT.
32 |
33 | 3. You _must_ setup an A (and AAAA record if IPv6 DNS resolution is desired) for your domain, pointing to the IP address of your Linux server.
34 | This is required to generate a valid ZeroSSL SSL Certificate and used for DoH & DoT.\
35 |
36 | 4. You _must_ create 3 cnames: `traefik`, `adguard` and `portainer` this is needed for traefik as a reverse proxy provider. So you will connect to: `adguard.example.com` but you can also use `traefik.example.com` and `portainer.example.com`.
37 |
38 | ## Installation Instructions
39 |
40 | 1. Install Ansible, for example: `sudo apt-add-repository -y ppa:ansible/ansible && sudo apt install ansible` on the machine that will initiate the playbook. Or run [THIS](https://github.com/bruvv/terraform-oracle-cloud-free-adguard) Terraform script to automaticilly create a free linux ARM server with Oracle Cloud)
41 |
42 | 2. Clone repository using `git clone https://github.com/Freekers/ansible-adguard.git`
43 |
44 | 3. Install requirements `ansible-galaxy install -r requirements/requirements.yml`
45 |
46 | 4. Change all the needed stuff in `vars` folder. But in specific: `docker.yml` & `firewall.yml` & `user-management.yml`
47 |
48 | 4.1 if you want to configure an external server edit: `inventories/inventory.yml` with the server ip you want to configure.
49 |
50 | 5. If you want to configure a complete server: `ansible-playbook ansible-playbook.yml -i inventory/inventory.yml -e "hostname=adguard.website.com emailaddress=here@email.com"`
51 |
52 | 5.1 or if you want just to install adguard and not configure a whole server: `ansible-playbook ansible-playbook.yml -e "hostname=adguard.website.com emailaddress=here@email.com" -t adguard`
53 |
54 | 5.2 If you want to run this on your local computer use: `ansible-playbook --connection=local --inventory 127.0.0.1, ansible-playbook.yml -e "hostname=adguard.website.com emailaddress=here@email.com"`
55 |
56 | 6. After installation, it can take up to 5 minutes before your AdGuard Home instance will be accessible. This is due to ZeroSSL's certificate creation process. AdGuard Home will _not_ start before a valid SSL certificate has been generated, so please be patient! For more information, please refer to the 'Usage Instructions' section below.
57 |
58 | Supported distros:
59 |
60 | - Ubuntu 18.04 & 20.04 && 22.04
61 | - Debian 9 & 10
62 | - RockyLinux 8 & 9
63 |
64 | You can also switch to [blocky](https://0xerr0r.github.io/blocky/) just change the docker-compose file found in: `/roles/docker/templates/docker-compose.yml.j2`.
65 |
66 | ## Usage Instructions
67 |
68 | After installation, you can access the AdGuard Home admin interface of your instance by navigating to yourdomain.com. You should automatically be redirected to the login screen of your AdGuard Home instance.
69 | Please remember that it can take up to 5 minutes before your AdGuard Home instance will be accessible after installation due to ZeroSSL's certificate creation process. AdGuard Home will _not_ start before a valid SSL certificate has been generated, so please be patient!
70 |
71 | Refer to the setup page within the AdGuard Home's Admin interface to setup your devices to use your AdGuard Home instance as DNS server.
72 |
73 | The `docker-compose.yml` file will be located at `/srv/docker`. You can use regular docker and docker-compose commands to stop/start/restart containers.
74 |
75 | If needed, for manual configuration of AdGuard Home, [please refer to their official documententation.](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration)
76 | If needed, for manual configuration of Unbound, [please refer to their official documententation.](https://nlnetlabs.nl/documentation/unbound/)
77 | If needed, for manual configuration of Watchtower, [please refer to their official documententation.](https://containrrr.dev/watchtower/)
78 |
79 | ## Uninstallation Instructions
80 |
81 | 1. `sudo docker-compose -f /srv/docker/docker-compose.yml down`
82 | 2. `rm -rf /srv/docker`
83 | 3. Consult playbook.yml to manually review packages & firewall rules that are no longer needed (Optional)
84 |
85 | ## Acknowledgements
86 |
87 | - [ansible-role-docker](https://github.com/geerlingguy/ansible-role-docker) Ansible role by geerlingguy
88 | - [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) Docker image by AdguardTeam
89 | - [unbound](https://github.com/obi12341/docker-unbound) Docker image by obi12341
90 | - [watchtower](https://github.com/containrrr/watchtower) Docker image by containrrr
91 | - [oisd.nl](https://credits.oisd.nl) Blocklist by [sjhgvr](https://www.reddit.com/user/sjhgvr)
92 |
93 | ## License
94 |
95 | Unless otherwise specified, all code in this repository is released under the GNU Affero General Public License v3.0. See the [repository's `LICENSE` file](https://github.com/Freekers/ansible-adguard/blob/main/LICENSE) for details.
96 |
--------------------------------------------------------------------------------
/Vagrantfile:
--------------------------------------------------------------------------------
1 | # Read the README.md before using this.
2 |
3 | Vagrant.configure("2") do |config|
4 | $script = <<-SCRIPT
5 | # Update and upgrade packages
6 | sudo apt update -y && apt -y full-upgrade
7 | sudo apt install -y git curl wget ansible python3-pip
8 |
9 | # Create SSH key directory and add authorized keys file
10 | chmod 700 /home/vagrant/.ssh
11 | touch /home/vagrant/.ssh/authorized_keys && chmod 600 /home/vagrant/.ssh/authorized_keys
12 |
13 | # Configure keypair and add pubkey to authorized keys
14 | cd /vagrant && \
15 | cp tests/vagrant-keys/vagrant_key /home/vagrant/.ssh/id_ed25519
16 | cp tests/vagrant-keys/vagrant.pub /home/vagrant/.ssh/id_ed25519.pub
17 | cat /home/vagrant/.ssh/id_ed25519.pub >> /home/vagrant/.ssh/authorized_keys
18 |
19 | # Permissions for SSH keys
20 | chown vagrant:vagrant /home/vagrant/.ssh/id_ed25519 && chmod 600 /home/vagrant/.ssh/id_ed25519
21 | chown vagrant:vagrant /home/vagrant/.ssh/id_ed25519.pub && chmod 600 /home/vagrant/.ssh/id_ed25519.pub
22 |
23 | ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts
24 |
25 | # install zsh
26 | # git clone https://github.com/bruvv/ansible-role-zsh.git /tmp/zsh
27 | # ansible-playbook -i "localhost," -c local -b /tmp/zsh/playbook.yml
28 | # ansible-playbook -i "localhost," -c local -b /tmp/zsh/playbook.yml --extra-vars="zsh_user=$(whoami)"
29 |
30 | cd /vagrant && ansible-galaxy install -r requirements/requirements.yml
31 | SCRIPT
32 |
33 | # Add IP's and hostnames to hosts files
34 | $host_script = <<-SCRIPT
35 | printf "172.23.18.20 test_server\n" >> /etc/hosts
36 | SCRIPT
37 |
38 | # Add commands to make the running of playbooks easier
39 | $playbook_script = <<-SCRIPT
40 | printf "alias test='cd /vagrant && ansible-playbook --connection=local --inventory 127.0.0.1, ansible-playbook.yml'\n" >> /home/vagrant/.bash_profile
41 | SCRIPT
42 |
43 | # Set the resources for every vagrant box we are going to describe
44 | config.vm.provider "qemu" do |v|
45 | v.memory = "4G"
46 | # v.memory = 2048
47 | # v.cpus = 4
48 | v.extra_netdev_args = "net=172.23.18.0/24,dhcpstart=172.23.18.20"
49 |
50 | v.gui = true
51 | end
52 |
53 | # Set synced folders. This way we don't have to install the roles, because the playbooks are in /vagrant and the roles in /vagrant/roles.
54 | # Ansible will always look for a 'roles' folder when executing a playbook from a directory. This allows for easy development.
55 | # vagrant vbguest --do install --no-cleanup
56 | config.vm.synced_folder ".", "/vagrant", type: "rsync"
57 | config.ssh.insert_key = false
58 |
59 | # Actually 'calling' the scripts and run them either with elevated privileges or not.
60 | config.vm.provision "shell", inline: $script, privileged: false
61 | config.vm.provision "shell", inline: $host_script, privileged: true
62 |
63 | config.vm.define "test_server" do |ansible_host_01|
64 | ansible_host_01.vm.box = "perk/ubuntu-2204-arm64" # arm ubuntu for apple sillicon
65 | # ansible_host_01.vbguest.installer_options = { allow_kernel_upgrade: true }
66 | # ansible_host_01.vbguest.installer_hooks[:before_install] = ["dnf update -y kernel-*", "sleep 2"]
67 | # ansible_host_01.vm.box = "ubuntu/jammy64" #ubuntu 22.04
68 | ansible_host_01.vm.provision "shell", inline: $playbook_script, privileged: false
69 | ansible_host_01.vm.provision :shell, inline: "hostnamectl set-hostname test_server"
70 | # ansible_host_01.vm.network "private_network", ip: "172.23.18.20", nic_type: "virtio"
71 | ansible_host_01.vm.provision "shell", inline: "echo rebooting", privileged: true, reboot: true
72 | end
73 |
74 | end
75 |
--------------------------------------------------------------------------------
/ansible-playbook.yml:
--------------------------------------------------------------------------------
1 | - name: Configure server
2 | hosts: "all"
3 | gather_facts: true
4 | become: true
5 | vars_files:
6 | - vars/clamav.yml
7 | - vars/docker.yml
8 | - vars/firewall.yml # all is done via iptables
9 | - vars/ntp.yml
10 | - vars/packages.yml
11 | - vars/security.yml
12 | - vars/selinux.yml
13 | - vars/user-management.yml
14 | - vars/zsh-antigen.yml
15 |
16 | roles:
17 | - { role: geerlingguy.firewall, when: ansible_os_family == 'RedHat' }
18 | - geerlingguy.ntp
19 | - geerlingguy.clamav
20 | - { role: geerlingguy.firewall, tags: firewall }
21 | - geerlingguy.security
22 | - geerlingguy.pip
23 | - robertdebock.selinux
24 | - { role: packages, tags: adguard }
25 | - user-management
26 | - bruvv.zsh_antigen
27 | - { role: docker, tags: adguard }
28 | - { role: cleanup, tags: adguard }
29 |
--------------------------------------------------------------------------------
/ansible.cfg:
--------------------------------------------------------------------------------
1 | [defaults]
2 | allow_world_readable_tmpfiles=true
--------------------------------------------------------------------------------
/inventories/inventory.yml:
--------------------------------------------------------------------------------
1 | all:
2 | hosts:
3 | webhosting:
4 | ansible_host: 11.22.33.44.55
5 | ansible_user: ubuntu
6 | # ansible_python_interpreter: /usr/bin/python3.6
7 | ansible_ssh_private_key_file: /path/to/pub/key
8 | ansible_ssh_common_args: "-o StrictHostKeyChecking=no"
9 |
--------------------------------------------------------------------------------
/inventories/local-inventory.yml:
--------------------------------------------------------------------------------
1 | ---
2 | all:
3 | hosts:
4 | localhost:
5 | ansible_connection: "local"
6 | ansible_python_interpreter: "/usr/bin/python3.6"
7 |
--------------------------------------------------------------------------------
/inventories/vagrant-inventory.yml:
--------------------------------------------------------------------------------
1 | ---
2 | all:
3 | hosts:
4 | test_server:
5 | ansible_connection: "ssh"
6 | vagrant_box: true
7 | ansible_ssh_pipelining: true
8 | ansible_user: "vagrant"
9 | ansible_host: "172.23.18.20"
10 | computer_hostname: "test_server"
11 | ansible_ssh_private_key_file: tests/vagrant-keys/vagrant_key
12 |
--------------------------------------------------------------------------------
/requirements/requirements.yml:
--------------------------------------------------------------------------------
1 | ---
2 | roles:
3 | - name: "geerlingguy.repo-epel"
4 | - name: "geerlingguy.ntp"
5 | - name: "geerlingguy.clamav"
6 | - name: "geerlingguy.firewall"
7 | - name: "geerlingguy.security"
8 | - name: "geerlingguy.docker"
9 | - name: "robertdebock.selinux"
10 | - name: "geerlingguy.pip"
11 | - name: "bruvv.zsh_antigen"
12 |
--------------------------------------------------------------------------------
/roles/cleanup/defaults/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
--------------------------------------------------------------------------------
/roles/cleanup/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # This file it not yet needed. As soon as we install something that needs a restart, write it down here.
3 |
--------------------------------------------------------------------------------
/roles/cleanup/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Remove dependencies that are no longer required Debian
3 | ansible.builtin.apt:
4 | autoclean: true
5 | autoremove: true
6 | when:
7 | - ansible_os_family == 'Debian'
8 |
9 | - name: Autoremove unneeded packages installed as dependencies Rocky
10 | ansible.builtin.dnf:
11 | autoremove: true
12 | when:
13 | - ansible_os_family == 'RedHat'
14 |
15 | - name: Display post install message
16 | ansible.builtin.debug:
17 | msg:
18 | - "*** AdGuard Home Installation Completed Successfully! ***"
19 | - "*** The admin interface of your instance can be accessed via {{ hostname }} using password: {{ adguardwebpassword }}"
20 | - "*** NOTE: It can take up to 5 minutes before AdGuard Home will be accessible ***"
21 | - "*** This is due to Lets Encrypt certificate creation process, please be patient! ***"
22 | - "*** For more information, please refer to the Usage Instructions in the README ***"
23 |
--------------------------------------------------------------------------------
/roles/docker/defaults/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
--------------------------------------------------------------------------------
/roles/docker/files/middlewares.yml:
--------------------------------------------------------------------------------
1 | http:
2 | middlewares:
3 | # Redirect non-www URLs to their www equivalent make sure to use: Host(`domain.com`) || Host(`www.domain.com`) for the hosted site
4 | # Use with - "traefik.http.routers.Irisdegraafcom.middlewares=redirect-non-www-to-www@file"
5 | redirect-non-www-to-www:
6 | # Redirect a request from an url to another with regex matching and replacement
7 | redirectregex:
8 | # Apply a permanent redirection (HTTP 301)
9 | permanent: true
10 | # The regular expression to match and capture elements from the request URL
11 | regex: "^https?://(?:www\\.)?(.+)"
12 | # How to modify the URL to have the new target URL
13 | replacement: "https://www.${1}" # Redirect www URLs to their non-www equivalent
14 | # Use with - "traefik.http.routers.Irisdegraafcom.middlewares=redirect-www-to-non-www@file"
15 | redirect-www-to-non-www:
16 | # Redirect a request from an url to another with regex matching and replacement
17 | redirectregex:
18 | # Apply a permanent redirection (HTTP 301)
19 | permanent: true
20 | # The regular expression to match and capture elements from the request URL
21 | regex: "^https?://www\\.(.+)"
22 | # How to modify the URL to have the new target URL
23 | replacement: "https://${1}"
24 |
25 | middlewares-basic-auth:
26 | basicAuth:
27 | users:
28 | - "admin:changethis"
29 | #usersFile: "/run/secrets/htpasswd" #be sure to mount the volume through docker-compose.yml
30 | realm: "Traefik 2 Basic Auth"
31 |
32 | middlewares-rate-limit:
33 | rateLimit:
34 | average: 100
35 | burst: 50
36 |
37 | middlewares-ipwhitelist:
38 | ipWhiteList:
39 | sourceRange:
40 | - 172.27.0.0/12
41 |
42 | middlewares-secure-headers:
43 | headers:
44 | accessControlAllowMethods:
45 | - GET
46 | - OPTIONS
47 | - PUT
48 | accessControlMaxAge: 100
49 | hostsProxyHeaders:
50 | - "X-Forwarded-Host"
51 | # sslRedirect: true #replaced with middlewares-https-redirectscheme for v2.5.x
52 | stsSeconds: 63072000
53 | stsIncludeSubdomains: true
54 | stsPreload: true
55 | forceSTSHeader: true
56 | # frameDeny: true #overwritten by customFrameOptionsValue
57 | customFrameOptionsValue: SAMEORIGIN #"allow-from https:example.com" #CSP takes care of this but may be needed for organizr.
58 | contentTypeNosniff: true
59 | browserXssFilter: true
60 | # sslForceHost: true # add sslHost to all of the services
61 | # sslHost: "example.com"
62 | referrerPolicy: "same-origin"
63 | # Setting contentSecurityPolicy is more secure but it can break things. Proper auth will reduce the risk.
64 | # the below line also breaks some apps due to 'none' - sonarr, radarr, etc.
65 | # contentSecurityPolicy: "frame-ancestors '*.example.com:*';object-src 'none';script-src 'none';"
66 | # Line below, featurePolicy, was deprecated in v2.5.x in favor permissionPolicy
67 | # featurePolicy: "camera 'none'; geolocation 'none'; microphone 'none'; payment 'none'; usb 'none'; vr 'none';"
68 | permissionsPolicy: "camera=(), microphone=(), geolocation=(), payment=(), usb=(), vr=()"
69 | customResponseHeaders:
70 | X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex,"
71 | server: ""
72 | # https://community.traefik.io/t/how-to-make-websockets-work-with-traefik-2-0-setting-up-rancher/1732
73 | # X-Forwarded-Proto: "https"
74 |
75 | middlewares-compress:
76 | compress:
77 | excludedContentTypes:
78 | - text/event-stream
79 |
--------------------------------------------------------------------------------
/roles/docker/files/unbound.conf:
--------------------------------------------------------------------------------
1 | forward-zone:
2 | name: "."
3 | forward-tls-upstream: yes
4 |
5 | # CleanBrowsing
6 | forward-addr: 185.228.168.9@853#security-filter-dns.cleanbrowsing.org
7 | forward-addr: 185.228.169.9@853#security-filter-dns.cleanbrowsing.org
8 |
9 | # # Cloudflare
10 | forward-addr: 1.1.1.1@853
11 | forward-addr: 1.0.0.1@853
12 |
13 | # Quad9 ( Slowest, only serve as backup when the faster are temporarily down. )
14 | forward-addr: 9.9.9.9@853#dns.quad9.net
15 | forward-addr: 9.9.9.10@853#dns.quad9.net
--------------------------------------------------------------------------------
/roles/docker/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # This file it not yet needed. As soon as we install something that needs a restart, write it down here.
3 |
--------------------------------------------------------------------------------
/roles/docker/tasks/install-docker.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Stop conflicting services that occupy needed ports (53,80,443)
3 | become: true
4 | ansible.builtin.service:
5 | name: "{{ item }}"
6 | enabled: false
7 | state: stopped
8 | register: results
9 | loop:
10 | # - systemd-resolved
11 | # - dnsmasq
12 | - apache2
13 | - lighttpd
14 | - nginx
15 | failed_when: >-
16 | results is failed and
17 | "Could not find the requested service" not in results.msg|default('')
18 |
19 | - name: Temporarily use this nameserver during initial config and setup
20 | ansible.builtin.lineinfile:
21 | path: /etc/systemd/resolved.conf
22 | regexp: "#DNS="
23 | line: "DNS=9.9.9.9"
24 |
25 | - name: Disable internal DNS
26 | ansible.builtin.lineinfile:
27 | path: /etc/systemd/resolved.conf
28 | regexp: "#DNSStubListener=yes"
29 | line: "DNSStubListener=no"
30 |
31 | - name: Restart service httpd, in all cases
32 | ansible.builtin.service:
33 | name: systemd-resolved
34 | state: restarted
35 |
36 | - name: Install Docker and docker-compose
37 | ansible.builtin.include_role:
38 | name: "geerlingguy.docker"
39 | vars:
40 | docker_install_compose: false
41 | docker_install_compose_plugin: true
42 | docker_users:
43 | - docker
44 |
45 | - name: Create directory if they don't exist
46 | ansible.builtin.file:
47 | path: "/srv/docker"
48 | state: directory
49 | owner: docker
50 | group: docker
51 | mode: 0775
52 |
53 | - name: Create directory if they don't exist
54 | ansible.builtin.file:
55 | path: "/srv/docker/{{ item }}"
56 | state: directory
57 | owner: docker
58 | group: docker
59 | mode: 0775
60 | with_items: "{{ folders }}"
61 | tags: test
62 |
--------------------------------------------------------------------------------
/roles/docker/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Install Docker
3 | ansible.builtin.include_tasks: install-docker.yml
4 | tags:
5 | - test
6 |
7 | - name: Restart docker to make sure iptables are correct
8 | ansible.builtin.service:
9 | name: docker
10 | state: restarted
11 | tags: firewall
12 |
13 | - name: Run Docker Compose
14 | ansible.builtin.include_tasks: run-docker-compose.yml
15 | tags:
16 | - install-containers
17 | - test
18 |
--------------------------------------------------------------------------------
/roles/docker/tasks/run-docker-compose.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Copy Docker Compose
3 | ansible.builtin.template:
4 | src: docker-compose.yml.j2
5 | dest: /srv/docker/docker-compose.yml
6 | owner: "docker"
7 | group: "docker"
8 | remote_src: false
9 | mode: "0755"
10 | tags:
11 | - install-containers
12 | - test
13 |
14 | - name: Copy traefik conf
15 | ansible.builtin.template:
16 | src: traefik.yml.j2
17 | dest: /srv/docker/traefik2/traefik.yaml
18 | owner: "docker"
19 | group: "docker"
20 | remote_src: false
21 | mode: "0644"
22 | tags:
23 | - test
24 |
25 | - name: Copy middlewares file
26 | ansible.builtin.copy:
27 | src: middlewares.yml
28 | dest: /srv/docker/traefik2/rules/middlewares.yml
29 | owner: "docker"
30 | group: "docker"
31 | mode: "0644"
32 |
33 | - name: Copy blocky conf
34 | ansible.builtin.template:
35 | src: blocky.yml.j2
36 | dest: /srv/docker/blocky/blocky.yaml
37 | owner: "docker"
38 | group: "docker"
39 | remote_src: false
40 | mode: "0644"
41 | tags:
42 | - test
43 |
44 | - name: Copy unbound conf
45 | ansible.builtin.copy:
46 | src: unbound.conf
47 | dest: /srv/docker/unbound/forward-records.conf
48 | owner: "docker"
49 | group: "docker"
50 | mode: "0644"
51 | tags:
52 | - test
53 |
54 | - name: Create AdGuard Home config file
55 | ansible.builtin.template:
56 | src: adguard-conf.yml.j2
57 | dest: /srv/docker/adguard/conf/AdGuardHome.yaml
58 | owner: "docker"
59 | group: "docker"
60 | mode: 0755
61 | tags:
62 | - test
63 |
64 | - name: Generate hash for Adguard admin password
65 | ansible.builtin.command: htpasswd -B -n -b {{ adguardwebuser }} {{ adguardwebpassword }}
66 | register: htpasswd_generate
67 |
68 | - name: Update Admin password in AdGuardHome.yaml
69 | ansible.builtin.replace:
70 | path: /srv/docker/adguard/conf/AdGuardHome.yaml
71 | regexp: "adguardwebpassword"
72 | replace: "{{ htpasswd_generate.stdout.split(':')[1] }}"
73 |
74 | - name: Deploy Stack using Docker Compose
75 | become: true
76 | ansible.builtin.shell:
77 | cmd: "docker compose -f docker-compose.yml up -d"
78 | chdir: /srv/docker
79 | tags:
80 | - test
81 |
--------------------------------------------------------------------------------
/roles/docker/templates/adguard-conf.yml.j2:
--------------------------------------------------------------------------------
1 | bind_host: 0.0.0.0
2 | bind_port: 80
3 | beta_bind_port: 0
4 | users:
5 | - name: {{ adguardwebuser }}
6 | password: adguardwebpassword
7 | auth_attempts: 5
8 | block_auth_min: 15
9 | http_proxy: ""
10 | language: ""
11 | debug_pprof: false
12 | web_session_ttl: 720
13 | dns:
14 | bind_hosts:
15 | - 0.0.0.0
16 | port: 53
17 | statistics_interval: 90
18 | querylog_enabled: true
19 | querylog_file_enabled: true
20 | querylog_interval: 2160h
21 | querylog_size_memory: 1000
22 | anonymize_client_ip: false
23 | protection_enabled: true
24 | blocking_mode: default
25 | blocking_ipv4: ""
26 | blocking_ipv6: ""
27 | blocked_response_ttl: 10
28 | parental_block_host: family-block.dns.adguard.com
29 | safebrowsing_block_host: standard-block.dns.adguard.com
30 | ratelimit: 20
31 | ratelimit_whitelist: []
32 | refuse_any: true
33 | upstream_dns:
34 | - udp://10.5.0.6:5053
35 | upstream_dns_file: ""
36 | bootstrap_dns:
37 | - 9.9.9.10
38 | - 149.112.112.10
39 | - 2620:fe::10
40 | - 2620:fe::fe:10
41 | all_servers: false
42 | fastest_addr: false
43 | fastest_timeout: 1s
44 | allowed_clients: []
45 | disallowed_clients:
46 | - 2.58.12.1/24
47 | - 162.142.125.1/24
48 | - 88.80.186.137
49 | - 5.180.1.1/16
50 | - 5.183.1.1/16
51 | - 5.188.1.1/16
52 | - 18.231.91.2
53 | - 18.232.89.0
54 | - 23.254.36.34
55 | - 24.125.204.172
56 | - 24.147.80.152
57 | - 37.120.218.106
58 | - 39.34.154.57
59 | - 39.96.140.104
60 | - 39.104.19.202
61 | - 39.105.100.118
62 | - 39.105.229.105
63 | - 42.186.112.67
64 | - 45.10.232.141/24
65 | - 45.45.45.45
66 | - 45.56.1.1/16
67 | - 45.57.247.23
68 | - 45.61.142.184
69 | - 45.83.64.0
70 | - 45.135.232.1/24
71 | - 45.143.200.1/24
72 | - 45.146.0.1/16
73 | - 45.155.205.1/24
74 | - 45.227.253.116
75 | - 46.243.140.1/24
76 | - 47.243.101.175
77 | - 47.251.34.0
78 | - 47.252.2.6
79 | - 47.252.86.224
80 | - 47.254.170.110
81 | - 51.210.48.107
82 | - 52.73.169.0
83 | - 64.145.1.1/16
84 | - 66.240.236.0
85 | - 67.240.44.5
86 | - 68.81.175.223
87 | - 68.110.78.59
88 | - 69.16.157.1/24
89 | - 71.6.146.0
90 | - 71.6.232.0
91 | - 73.41.219.138
92 | - 74.82.47.0
93 | - 75.23.191.246
94 | - 75.84.182.230
95 | - 75.133.159.190
96 | - 76.120.140.172
97 | - 77.243.191.120
98 | - 78.128.1.1/16
99 | - 79.124.62.1/24
100 | - 79.125.49.190
101 | - 80.25.158.172
102 | - 80.82.65.1/24
103 | - 80.194.235.101
104 | - 81.103.10.134
105 | - 81.225.158.24
106 | - 83.143.246.0
107 | - 84.247.50.1/24
108 | - 88.125.172.77
109 | - 89.39.107.167
110 | - 89.40.182.0
111 | - 89.248.165.1/24
112 | - 90.24.76.240
113 | - 91.132.58.1/24
114 | - 91.191.209.1/24
115 | - 91.216.110.0
116 | - 92.63.197.0/24
117 | - 92.118.161.0
118 | - 94.156.174.45
119 | - 98.156.167.222
120 | - 102.39.253.30
121 | - 103.107.197.46
122 | - 103.125.235.22
123 | - 103.145.13.0/24
124 | - 104.55.51.212
125 | - 104.159.183.76
126 | - 104.169.74.143
127 | - 104.238.39.219
128 | - 104.238.44.46
129 | - 109.238.11.14
130 | - 111.200.195.67
131 | - 116.90.74.204
132 | - 120.232.176.0
133 | - 122.228.19.0
134 | - 123.206.235.0
135 | - 129.250.206.0
136 | - 129.250.206.86
137 | - 131.159.24.242
138 | - 131.196.101.14
139 | - 138.122.233.1/16
140 | - 138.186.78.18
141 | - 139.162.250.203
142 | - 141.212.123.0
143 | - 143.202.163.78
144 | - 143.202.163.80
145 | - 144.217.207.0
146 | - 146.88.240.1/24
147 | - 147.135.104.186
148 | - 147.203.238.0
149 | - 154.17.5.0
150 | - 162.194.141.97
151 | - 162.248.93.178
152 | - 164.52.24.0
153 | - 167.94.138.1/24
154 | - 167.248.133.1/24
155 | - 168.228.197.144
156 | - 169.45.119.36
157 | - 169.55.119.4
158 | - 172.58.83.4
159 | - 172.83.45.212
160 | - 172.104.217.92
161 | - 172.111.1.1/16
162 | - 173.195.15.243
163 | - 173.208.169.130
164 | - 173.245.1.1/16
165 | - 174.90.223.150
166 | - 176.9.38.88
167 | - 176.58.103.0
168 | - 176.67.1.1/16
169 | - 183.230.113.51
170 | - 185.108.107.1/16
171 | - 185.143.223.22
172 | - 185.147.212.1/16
173 | - 185.191.34.0/24
174 | - 187.147.93.46
175 | - 187.150.6.144
176 | - 187.190.1.1/16
177 | - 187.251.136.8
178 | - 189.61.175.236
179 | - 189.176.42.74
180 | - 192.35.168.0
181 | - 192.87.173.56
182 | - 192.182.160.249
183 | - 192.200.158.1/16
184 | - 192.241.214.1/24
185 | - 192.241.220.0
186 | - 193.27.228.1/24
187 | - 193.29.15.0
188 | - 193.57.124.83
189 | - 193.163.125.1/24
190 | - 193.169.252.0
191 | - 193.242.145.1/24
192 | - 194.61.1.1/16
193 | - 195.37.190.0
194 | - 195.54.160.1/24
195 | - 196.52.43.0
196 | - 198.23.119.36
197 | - 198.74.56.29
198 | - 198.181.163.31
199 | - 202.73.14.54
200 | - 202.73.14.58
201 | - 202.112.238.55
202 | - 202.112.238.56
203 | - 205.185.1.1/16
204 | - 209.58.142.157
205 | - 209.107.1.1/16
206 | - 213.127.30.63
207 | - 216.131.1.1/16
208 | - 216.151.1.1/16
209 | - 218.75.38.0
210 | - 220.180.241.26
211 | - 223.71.167.0
212 | blocked_hosts:
213 | - version.bind
214 | - id.server
215 | - hostname.bind
216 | - pizzaseo.com
217 | trusted_proxies:
218 | - 127.0.0.0/8
219 | - 172.0.0.0/8
220 | - 10.0.0.0/8
221 | - ::1/128
222 | cache_size: 4294967295
223 | cache_ttl_min: 3600
224 | cache_ttl_max: 172800
225 | cache_optimistic: true
226 | bogus_nxdomain: []
227 | aaaa_disabled: true
228 | enable_dnssec: true
229 | edns_client_subnet: true
230 | max_goroutines: 300
231 | handle_ddr: true
232 | ipset: []
233 | ipset_file: ""
234 | filtering_enabled: true
235 | filters_update_interval: 12
236 | parental_enabled: false
237 | safesearch_enabled: false
238 | safebrowsing_enabled: true
239 | safebrowsing_cache_size: 1048576
240 | safesearch_cache_size: 1048576
241 | parental_cache_size: 1048576
242 | cache_time: 30
243 | rewrites: []
244 | blocked_services: []
245 | upstream_timeout: 10s
246 | private_networks: []
247 | use_private_ptr_resolvers: true
248 | local_ptr_upstreams: []
249 | serve_http3: false
250 | use_http3_upstreams: false
251 | tls:
252 | enabled: true
253 | server_name: adfree.{{ hostname }}
254 | force_https: false
255 | port_https: 443
256 | port_dns_over_tls: 853
257 | port_dns_over_quic: 784
258 | port_dnscrypt: 0
259 | dnscrypt_config_file: ""
260 | allow_unencrypted_doh: true # this setting is important, since we are using a reverse proxy to access DoH
261 | strict_sni_check: false
262 | certificate_chain: ""
263 | private_key: ""
264 | certificate_path: ""
265 | private_key_path: ""
266 | filters:
267 | - enabled: true
268 | url: https://abp.oisd.nl/
269 | name: OISD
270 | id: 1589486914
271 | - enabled: false
272 | url: https://raw.githubusercontent.com/ookangzheng/dbl-oisd-nl/master/abp.txt
273 | name: OISD Mirror
274 | id: 1589486915
275 | - enabled: true
276 | url: https://www.bentasker.co.uk/adblock/blockeddomains.txt
277 | name: ben
278 | id: 1592489957
279 | - enabled: true
280 | url: https://raw.githubusercontent.com/hectorm/hmirror/master/data/phishing.army-extended/list.txt
281 | name: phishing
282 | id: 1592489962
283 | - enabled: true
284 | url: https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist/list.txt
285 | name: easylist
286 | id: 1592489973
287 | - enabled: false
288 | url: https://raw.githubusercontent.com/mmotti/adguard-home-filters/master/regex.txt
289 | name: MMotti AdguardHome - regex.txt
290 | id: 1594131050
291 | - enabled: true
292 | url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt
293 | name: AdGuard DNS filter
294 | id: 1600878098
295 | - enabled: true
296 | url: https://someonewhocares.org/hosts/zero/hosts
297 | name: Dan Pollock's List
298 | id: 1600878099
299 | - enabled: true
300 | url: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblockList.txt
301 | name: Game Console Adblock List
302 | id: 1600878100
303 | - enabled: true
304 | url: https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV-AGH.txt
305 | name: Perflyst and Dandelion Sprout's Smart-TV Blocklist
306 | id: 1600878101
307 | - enabled: true
308 | url: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=adblockplus&showintro=1&mimetype=plaintext
309 | name: Peter Lowe's List
310 | id: 1600878103
311 | - enabled: true
312 | url: https://raw.githubusercontent.com/durablenapkin/scamblocklist/master/adguard.txt
313 | name: Scam Blocklist by DurableNapkin
314 | id: 1600878106
315 | - enabled: true
316 | url: https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hacked-domains.list
317 | name: The Big List of Hacked Malware Web Sites
318 | id: 1600878108
319 | - enabled: true
320 | url: https://adaway.org/hosts.txt
321 | name: AdAway Default Blocklist
322 | id: 1603943059
323 | - enabled: true
324 | url: https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
325 | name: NoCoin Filter List
326 | id: 1603943060
327 | - enabled: true
328 | url: https://raw.githubusercontent.com/bruvv/whitelist/master/domains/blocklist.txt
329 | name: Bruvv blocklist
330 | id: 1606817416
331 | - enabled: true
332 | url: https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
333 | name: WindowsSpyBlocker - Hosts spy rules
334 | id: 1613015134
335 | - enabled: true
336 | url: https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hosts
337 | name: The Big List of Hacked Malware Web Sites
338 | id: 1613015135
339 | - enabled: true
340 | url: https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt
341 | name: Cname
342 | id: 1613447096
343 | - enabled: true
344 | url: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareAdGuardHome.txt
345 | name: Dandelion Sprout's Anti-Malware List
346 | id: 1666304968
347 | - enabled: true
348 | url: https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-agh-online.txt
349 | name: Online Malicious URL Blocklist
350 | id: 1666304969
351 | whitelist_filters:
352 | - enabled: false
353 | url: https://raw.githubusercontent.com/anudeepND/whitelist/master/domains/referral-sites.txt
354 | name: referral
355 | id: 1594131048
356 | - enabled: true
357 | url: https://raw.githubusercontent.com/bruvv/whitelist/master/domains/whitelist.txt
358 | name: bruvv whitelist
359 | id: 1594131049
360 | - enabled: true
361 | url: https://raw.githubusercontent.com/bruvv/whitelist/master/domains/ref_whitelist.txt
362 | name: Bruvv ref_whitelist
363 | id: 1632001876
364 | user_rules:
365 | - /^[a-z]{15}\.(ru|su|cn)$/
366 | - '@@||local^$important'
367 | dhcp:
368 | enabled: false
369 | interface_name: ""
370 | local_domain_name: lan
371 | dhcpv4:
372 | gateway_ip: ""
373 | subnet_mask: ""
374 | range_start: ""
375 | range_end: ""
376 | lease_duration: 86400
377 | icmp_timeout_msec: 1000
378 | options: []
379 | dhcpv6:
380 | range_start: ""
381 | lease_duration: 86400
382 | ra_slaac_only: false
383 | ra_allow_slaac: false
384 | clients:
385 | runtime_sources:
386 | whois: true
387 | arp: true
388 | rdns: true
389 | dhcp: true
390 | hosts: false
391 | persistent: []
392 | log_file: ""
393 | log_max_backups: 0
394 | log_max_size: 100
395 | log_max_age: 3
396 | log_compress: false
397 | log_localtime: false
398 | verbose: false
399 | os:
400 | group: ""
401 | user: ""
402 | rlimit_nofile: 0
403 | schema_version: 14
--------------------------------------------------------------------------------
/roles/docker/templates/blocky.yml.j2:
--------------------------------------------------------------------------------
1 | upstream:
2 | default:
3 | - 10.5.0.6:5053
4 | # - tcp-tls:dns.quad9.net:853
5 | # - tcp-tls:dns.adguard.com:853
6 | # - tcp-tls:cloudflare-dns.com:853
7 |
8 | blocking:
9 | blackLists:
10 | ads:
11 | - https://dbl.oisd.nl/
12 | - https://www.bentasker.co.uk/adblock/blockeddomains.txt
13 | - https://raw.githubusercontent.com/hectorm/hmirror/master/data/phishing.army-extended/list.txt
14 | - https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist/list.txt
15 | - https://someonewhocares.org/hosts/zero/hosts
16 | - https://raw.githubusercontent.com/mmotti/adguard-home-filters/master/regex.txt
17 | - https://pgl.yoyo.org/as/serverlist.php?hostformat=adblock&showintro=0&mimetype=plaintext
18 | - https://raw.githubusercontent.com/durablenapkin/scamblocklist/master/hosts.txt
19 | - https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hacked-domains.list
20 | - https://adaway.org/hosts.txt
21 | - https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
22 | - https://raw.githubusercontent.com/bruvv/whitelist/master/domains/blocklist.txt
23 | - https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
24 | - https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hosts
25 | - https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers_justdomains.txt
26 | whiteLists:
27 | ads:
28 | - https://raw.githubusercontent.com/bruvv/whitelist/master/domains/whitelist.txt
29 | - https://raw.githubusercontent.com/bruvv/whitelist/master/domains/ref_whitelist.txt
30 | blockType: zeroIp
31 | prometheus:
32 | enable: false
33 | port: 53
34 | tlsPort: 853
35 | httpPort: 80
36 | httpsPort: 443
37 |
38 | # optional: configuration for caching of DNS responses
39 | caching:
40 | # duration how long a response must be cached (min value).
41 | # If <=0, use response's TTL, if >0 use this value, if TTL is smaller
42 | # Default: 0
43 | minTime: 5m
44 | # duration how long a response must be cached (max value).
45 | # If <0, do not cache responses
46 | # If 0, use TTL
47 | # If > 0, use this value, if TTL is greater
48 | # Default: 0
49 | maxTime: 30m
50 | # Max number of cache entries (responses) to be kept in cache (soft limit). Useful on systems with limited amount of RAM.
51 | # Default (0): unlimited
52 | maxItemsCount: 0
53 | # if true, will preload DNS results for often used queries (default: names queried more than 5 times in a 2-hour time window)
54 | # this improves the response time for often used queries, but significantly increases external traffic
55 | # default: false
56 | prefetching: true
57 | # prefetch track time window (in duration format)
58 | # default: 120
59 | prefetchExpires: 2h
60 | # name queries threshold for prefetch
61 | # default: 5
62 | prefetchThreshold: 5
63 | # Max number of domains to be kept in cache for prefetching (soft limit). Useful on systems with limited amount of RAM.
64 | # Default (0): unlimited
65 | prefetchMaxItemsCount: 0
66 | # Time how long negative results (NXDOMAIN response or empty result) are cached. A value of -1 will disable caching for negative results.
67 | # Default: 30m
68 | cacheTimeNegative: 30m
69 |
70 | filtering:
71 | # optional: drop all queries with following query types. Default: empty
72 | queryTypes:
73 | - AAAA
74 |
75 | bootstrapDns: tcp+udp:1.1.1.1
76 |
--------------------------------------------------------------------------------
/roles/docker/templates/docker-compose.yml.j2:
--------------------------------------------------------------------------------
1 | version: "3.3"
2 |
3 | networks:
4 | traefik_proxy:
5 | name: traefik_proxy
6 | backend:
7 | driver: bridge
8 | ipam:
9 | config:
10 | - subnet: 10.5.0.0/24
11 | gateway: 10.5.0.1
12 | ip_range: 10.5.0.4/30
13 |
14 | services:
15 | traefik:
16 | image: traefik:latest
17 | container_name: traefik
18 | restart: {{dockerrestartpolicy}}
19 | networks:
20 | - traefik_proxy
21 | ports:
22 | - target: 80
23 | published: 80
24 | protocol: tcp
25 | mode: host
26 | - target: 443
27 | published: 443
28 | protocol: tcp
29 | mode: host
30 | - target: 853
31 | published: 853
32 | protocol: tcp
33 | mode: host
34 | - target: 53
35 | published: 53
36 | protocol: tcp
37 | mode: host
38 | - target: 53
39 | published: 53
40 | protocol: udp
41 | mode: host
42 | volumes:
43 | - "/var/run/docker.sock:/var/run/docker.sock"
44 | - "/srv/docker/traefik2/rules:/rules"
45 | - "/srv/docker/traefik2/acme:/letsencrypt"
46 | - "/srv/docker/traefik2/traefik.yaml:/etc/traefik/traefik.yaml"
47 | environment:
48 | - TZ={{ntp_timezone}}
49 | labels:
50 | - "traefik.enable=true"
51 | - "traefik.docker.network=traefik_proxy"
52 | - "traefik.http.routers.traefikdashboard.rule=Host(`traefik.{{hostname}}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
53 | - "traefik.http.routers.traefikdashboard.entrypoints=websecure"
54 | - "traefik.http.routers.traefikdashboard.service=api@internal"
55 | - "traefik.http.routers.traefikdashboard.tls=true"
56 | - "traefik.http.routers.traefikdashboard.tls.certresolver=lets-encrypt"
57 | - "traefik.http.routers.traefikdashboard.middlewares=middlewares-ipwhitelist@file, redirect-web-to-websecure@internal, middlewares-rate-limit@file"
58 |
59 | adguard:
60 | image: adguard/adguardhome:latest
61 | container_name: adguard
62 | restart: {{dockerrestartpolicy}}
63 | networks:
64 | - traefik_proxy
65 | - backend
66 | environment:
67 | - TZ={{ntp_timezone}}
68 | volumes:
69 | - /srv/docker/adguard/conf:/opt/adguardhome/conf
70 | - /srv/docker/adguard/work:/opt/adguardhome/work
71 | labels:
72 | - "traefik.enable=true"
73 | - "traefik.docker.network=traefik_proxy"
74 |
75 | # web interface
76 | - "traefik.http.routers.adfree-gui.rule=Host(`adguard.{{hostname}}`)"
77 | - "traefik.http.routers.adfree-gui.entrypoints=websecure"
78 | - "traefik.http.routers.adfree-gui.tls.certresolver=lets-encrypt"
79 | - "traefik.http.services.adfree-gui.loadbalancer.server.port=80"
80 |
81 | # DNS-over-TLS
82 | - "traefik.tcp.routers.dnsovertls.rule=HostSNI(`adguard.{{hostname}}`)"
83 | - "traefik.tcp.routers.dnsovertls.entrypoints=dnsovertls"
84 | - "traefik.tcp.routers.dnsovertls.tls=true"
85 | - "traefik.tcp.routers.dnsovertls.tls.certresolver=lets-encrypt"
86 | - "traefik.tcp.routers.dnsovertls.service=adguard-tcp"
87 | - "traefik.tcp.services.adguard-tcp.loadbalancer.server.port=53"
88 |
89 | # Normal DNS coming in on 53 TCP, no TLS
90 | - "traefik.tcp.routers.dns.rule=HostSNI(`*`)"
91 | - "traefik.tcp.routers.dns.entrypoints=dns"
92 | - "traefik.tcp.routers.dns.service=adguard-tcp"
93 |
94 | # Normal DNS coming in on 53 UDP
95 | - "traefik.udp.routers.udpdns.entrypoints=udpdns"
96 | - "traefik.udp.routers.udpdns.service=adguard-udp"
97 | - "traefik.udp.services.adguard-udp.loadbalancer.server.port=53"
98 |
99 | # blocky:
100 | # image: spx01/blocky
101 | # container_name: blocky
102 | # restart: {{dockerrestartpolicy}}
103 | # networks:
104 | # - traefik_proxy
105 | # - backend
106 | # environment:
107 | # - TZ={{ntp_timezone}}
108 | # volumes:
109 | # - /srv/docker/blocky/blocky.yaml:/app/config.yml
110 | # labels:
111 | # - "traefik.enable=true"
112 | # - "traefik.docker.network=traefik_proxy"
113 |
114 | # # web interface
115 | # # - traefik.http.routers.blocky.rule=Host(`blocky.{{hostname}}`)
116 | # # - traefik.http.routers.blocky.entrypoints=websecure
117 | # # - traefik.http.routers.blocky.tls.certresolver=lets-encrypt
118 | # # - traefik.http.services.blocky.loadbalancer.server.port=80
119 |
120 | # # DNS-over-TLS
121 | # - "traefik.tcp.routers.dnsovertls.rule=HostSNI(`blocky.{{hostname}}`)"
122 | # - "traefik.tcp.routers.dnsovertls.entrypoints=dnsovertls"
123 | # - "traefik.tcp.routers.dnsovertls.tls=true"
124 | # - "traefik.tcp.routers.dnsovertls.tls.certresolver=lets-encrypt"
125 | # - "traefik.tcp.routers.dnsovertls.service=blocky"
126 |
127 | # # Normal DNS coming in on 53 TCP, no TLS
128 | # - "traefik.tcp.routers.dns.rule=HostSNI(`blocky.{{hostname}}`)"
129 | # - "traefik.tcp.routers.dns.entrypoints=dns"
130 | # - "traefik.tcp.routers.dns.tls=false"
131 | # - "traefik.tcp.routers.dns.service=blocky"
132 |
133 | # # recieves traffic from both the TLS and non-TLS traefik routers
134 | # - "traefik.tcp.services.blocky.loadbalancer.server.port=53"
135 |
136 | # # Normal DNS coming in on 53 UDP
137 | # - "traefik.udp.routers.udpdns.entrypoints=udpdns"
138 | # - "traefik.udp.routers.udpdns.service=blocky"
139 | # - "traefik.udp.services.blocky.loadbalancer.server.port=53"
140 |
141 | portainer:
142 | image: portainer/portainer-ce:latest
143 | container_name: portainer
144 | networks:
145 | - traefik_proxy
146 | restart: {{dockerrestartpolicy}}
147 | environment:
148 | - TZ={{ntp_timezone}}
149 | volumes:
150 | - /var/run/docker.sock:/var/run/docker.sock
151 | - /srv/docker/portainer:/data
152 | labels:
153 | - traefik.enable=true
154 | - traefik.docker.network=traefik_proxy
155 | - traefik.http.routers.portainer.rule=Host(`portainer.{{hostname}}`)
156 | - traefik.http.routers.portainer.entrypoints=websecure
157 | - traefik.http.routers.portainer.tls=true
158 | - traefik.http.routers.portainer.tls.certresolver=lets-encrypt
159 | - traefik.http.routers.portainer.service=portainer
160 | - traefik.http.routers.portainer.middlewares=middlewares-ipwhitelist@file, middlewares-compress@file
161 | - traefik.http.services.portainer.loadbalancer.server.port=9443
162 | - traefik.http.services.portainer.loadbalancer.server.scheme=https
163 |
164 |
165 | unbound:
166 | image: crazymax/unbound
167 | container_name: unbound
168 | restart: {{dockerrestartpolicy}}
169 | networks:
170 | backend:
171 | ipv4_address: 10.5.0.6
172 | ports:
173 | - "5053:5053/tcp"
174 | - "5053:5053/udp"
175 | volumes:
176 | - "/srv/docker/unbound/forward-records.conf:/config/forward-records.conf:ro"
177 |
178 | watchtower:
179 | container_name: watchtower
180 | restart: {{dockerrestartpolicy}}
181 | network_mode: bridge
182 | image: containrrr/watchtower:latest
183 | environment:
184 | - WATCHTOWER_CLEANUP=true
185 | - WATCHTOWER_REMOVE_VOLUMES=true
186 | - WATCHTOWER_INCLUDE_STOPPED=true
187 | - TZ={{ntp_timezone}}
188 | - WATCHTOWER_DEBUG=false
189 | - WATCHTOWER_RUN_ONCE=false
190 | volumes:
191 | - /var/run/docker.sock:/var/run/docker.sock
192 | labels:
193 | - traefik.enable=false
194 |
--------------------------------------------------------------------------------
/roles/docker/templates/traefik.yml.j2:
--------------------------------------------------------------------------------
1 | ---
2 | global:
3 | sendAnonymousUsage: false
4 | #checkNewVersion: false
5 |
6 | api:
7 | insecure: false
8 | dashboard: true
9 | #debug: true
10 |
11 | log:
12 | level: "WARN"
13 |
14 | # accessLog:
15 | # format: json
16 |
17 | providers:
18 | docker:
19 | endpoint: unix:///var/run/docker.sock
20 | exposedByDefault: false
21 | watch: true
22 | file:
23 | directory: /rules
24 | watch: true
25 |
26 | serversTransport:
27 | insecureSkipVerify: true
28 |
29 | entryPoints:
30 | web:
31 | address: :80
32 | proxyProtocol:
33 | insecure: true
34 | forwardedHeaders:
35 | insecure: true
36 | http:
37 | redirections:
38 | entryPoint:
39 | to: websecure
40 | websecure:
41 | address: :443
42 | proxyProtocol:
43 | insecure: true
44 | forwardedHeaders:
45 | insecure: true
46 | dnsovertls:
47 | address: :853
48 | dns:
49 | address: :53
50 | udpdns:
51 | address: :53/udp
52 | # metrics:
53 | # address: :8456
54 |
55 | # smtp:
56 | # address: :25
57 | # smtp-ssl:
58 | # address: :465
59 | # imap-ssl:
60 | # address: :993
61 |
62 | certificatesResolvers:
63 | lets-encrypt:
64 | acme:
65 | #caserver: https://acme-staging-v02.api.letsencrypt.org/directory #only for debug
66 | email: {{emailaddress}}
67 | storage: /letsencrypt/acme.json
68 | tlschallenge: true
69 | preferredChain: 'ISRG Root X1'
70 | # httpChallenge:
71 | # entrypoint: web
72 | #metrics:
73 | # prometheus:
74 | # entryPoint: metrics
75 | # addEntryPointsLabels: true
76 | # addRoutersLabels: true
77 | # addServicesLabels: true
78 | # buckets:
79 | # - 0.1
80 | # - 0.3
81 | # - 1.2
82 | # - 5.0
83 |
--------------------------------------------------------------------------------
/roles/packages/defaults/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
--------------------------------------------------------------------------------
/roles/packages/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # This file it not yet needed. As soon as we install something that needs a restart, write it down here.
3 |
--------------------------------------------------------------------------------
/roles/packages/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Update and upgrade apt packages on Debian
3 | ansible.builtin.apt:
4 | upgrade: full
5 | update_cache: true
6 | when:
7 | - ansible_os_family == 'Debian'
8 |
9 | - name: Upgrade all packages on RedHat
10 | ansible.builtin.dnf:
11 | name: "*"
12 | state: latest
13 | update_cache: true
14 | when:
15 | - ansible_os_family == 'RedHat'
16 |
17 | - name: Install packages
18 | ansible.builtin.package:
19 | name: "{{ item }}"
20 | state: present
21 | with_items: "{{ packages }}"
22 |
--------------------------------------------------------------------------------
/roles/update-upgrade/defaults/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
--------------------------------------------------------------------------------
/roles/update-upgrade/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
--------------------------------------------------------------------------------
/roles/update-upgrade/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: Apt update Debian
3 | ansible.buildin.apt:
4 | update_cache: true
5 | when: apt_update and ansible_os_family == 'Debian'
6 |
7 | - name: Remove dependencies that are no longer required Debian
8 | ansible.buildin.apt:
9 | autoremove: true
10 | when: apt_autoremove and ansible_os_family == 'Debian'
11 |
12 | - name: Remove useless packages from the cache Debian
13 | ansible.buildin.apt:
14 | autoclean: true
15 | when: apt_autoclean and ansible_os_family == 'Debian'
16 |
17 | - name: Update all packages to their latest version Debian
18 | ansible.buildin.apt:
19 | name: "*"
20 | state: latest
21 | when: upgrade_packages and ansible_os_family == 'Debian'
22 |
23 | - name: Upgrade the OS (apt-get dist-upgrade) Debian
24 | ansible.buildin.apt:
25 | upgrade: dist
26 | when: dist_upgrade and ansible_os_family == 'Debian'
27 |
28 | - name: Apt update RedHat
29 | ansible.buildin.dnf:
30 | update_cache: true
31 | when: apt_update and ansible_os_family == 'RedHat'
32 |
33 | - name: Remove dependencies that are no longer required RedHat
34 | ansible.buildin.dnf:
35 | autoremove: true
36 | when: apt_autoremove and ansible_os_family == 'RedHat'
37 |
38 | - name: Remove useless packages from the cache RedHat
39 | ansible.buildin.dnf:
40 | autoclean: true
41 | when: apt_autoclean and ansible_os_family == 'RedHat'
42 |
43 | - name: Update all packages to their latest version RedHat
44 | ansible.buildin.dnf:
45 | name: "*"
46 | state: latest
47 | when: upgrade_packages and ansible_os_family == 'RedHat'
48 |
49 | - name: Upgrade the OS (apt-get dist-upgrade) RedHat
50 | ansible.buildin.dnf:
51 | upgrade: dist
52 | when: dist_upgrade and ansible_os_family == 'RedHat'
53 |
--------------------------------------------------------------------------------
/roles/user-management/defaults/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
--------------------------------------------------------------------------------
/roles/user-management/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
--------------------------------------------------------------------------------
/roles/user-management/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Create users and let them sudo without passwd. Upload their SSH keys.
3 | # - name: Ensure groups exists
4 | # ansible.builtin.group:
5 | # name: "{{ item.naam }}"
6 | # state: present
7 | # with_items: "{{ groep }}"
8 |
9 | - name: "Create user accounts and add users to groups"
10 | ansible.builtin.user:
11 | name: "{{ item.username }}"
12 | groups: "{{ item.groups }}"
13 | shell: "/bin/zsh"
14 | with_items: "{{ users }}"
15 | tags: add_users
16 |
17 | - name: "Add authorized keys"
18 | ansible.posix.authorized_key:
19 | user: "{{ item.username }}"
20 | key: "{{ lookup('file', 'ssh-keys/' + item.username + '.key.pub') }}"
21 | when: item.username != "podman" or item.username != "docker"
22 | with_items: "{{ users }}"
23 | tags: add_users
24 |
25 | - name: "Allow sudo users to sudo without a password Rocky Linux"
26 | ansible.builtin.lineinfile:
27 | dest: "/etc/sudoers"
28 | state: "present"
29 | regexp: "^%wheel"
30 | line: "%wheel ALL=(ALL) NOPASSWD: ALL"
31 | when: ansible_os_family == "RedHat"
32 | tags: add_users
33 |
34 | - name: "Allow sudo users to sudo without a password Debian"
35 | ansible.builtin.lineinfile:
36 | dest: "/etc/sudoers"
37 | state: "present"
38 | regexp: "^%sudo"
39 | line: "%sudo ALL=(ALL) NOPASSWD: ALL"
40 | when: ansible_os_family == 'Debian'
41 | tags: add_users
42 |
43 | - name: "Remove old user accounts in remove_users"
44 | ansible.builtin.user:
45 | name: "{{ item }}"
46 | state: "absent"
47 | remove: true
48 | with_items: "{{ remove_users }}"
49 | tags: remove_users
50 |
51 | - name: "Create .gitconfig for each user"
52 | ansible.builtin.template:
53 | src: "files/.gitconfig.j2"
54 | dest: "/home/{{ item.username }}/.gitconfig"
55 | owner: "{{ item.username }}"
56 | group: "{{ item.username }}"
57 | mode: "0644"
58 | remote_src: false
59 | become: true
60 | when: item.username != "podman" or item.username != "docker"
61 | with_items: "{{ users }}"
62 | tags: add_users
63 |
--------------------------------------------------------------------------------
/roles/user-management/templates/files/.gitconfig.j2:
--------------------------------------------------------------------------------
1 | [user]
2 | name = {{ item.name }}
3 | username = {{ item.username }}
4 | email = {{ item.email }}
5 |
6 | [core]
7 | excludesfile = /home/{{ item.username }}/.gitignore
--------------------------------------------------------------------------------
/ssh-keys/username.key.pub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Freekers/ansible-adguard/1dbef29b25cdc959bed622570bd41506340cec97/ssh-keys/username.key.pub
--------------------------------------------------------------------------------
/tests/vagrant-keys/vagrant.pub:
--------------------------------------------------------------------------------
1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ==
2 |
--------------------------------------------------------------------------------
/tests/vagrant-keys/vagrant_key:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
3 | w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
4 | kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
5 | hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
6 | Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
7 | yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
8 | ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
9 | Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
10 | TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
11 | iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
12 | sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
13 | 4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
14 | cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
15 | EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
16 | CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
17 | 3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
18 | YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
19 | 3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
20 | dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
21 | 6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
22 | P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
23 | llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
24 | kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
25 | +vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
26 | NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
27 | -----END RSA PRIVATE KEY-----
28 |
--------------------------------------------------------------------------------
/vars/clamav.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Rest is uncommented and will be handedeld by the role.
3 | # See the defaults for OS-specific vars inside the vars/ directory.
4 | # clamav_packages: []
5 | # clamav_daemon_config_path: ''
6 |
7 | # clamav_daemon_configuration_changes:
8 | # - regexp: '^.*Example$'
9 | # state: absent
10 | # - regexp: '^.*LocalSocket .*$'
11 | # line: 'LocalSocket {{ clamav_daemon_localsocket }}'
12 |
13 | # clamav_daemon: 'clamav-daemon'
14 | # clamav_daemon_state: started
15 | # clamav_daemon_enabled: true
16 |
17 | # clamav_freshclam_daemon: 'clamav-freshclam'
18 | # clamav_freshclam_daemon_state: started
19 | # clamav_freshclam_daemon_enabled: true
20 |
--------------------------------------------------------------------------------
/vars/docker.yml:
--------------------------------------------------------------------------------
1 | ---
2 | folders:
3 | - blocky
4 | - unbound
5 | - adguard
6 | - adguard/conf
7 | - adguard/work
8 | - traefik2
9 | - traefik2/rules
10 | - traefik2/acme
11 | - portainer
12 |
13 | adguardwebuser: "admin"
14 | adguardwebpassword: "P@$$w0rd"
15 |
16 | # Needed for letsencrypt
17 | emailaddress: "makesurethisischanged@email.com"
18 | dockerrestartpolicy: "unless-stopped"
19 |
20 | # Fully Qualified Domain Name (FQDN) with A (and AAAA) record pointing to your server's IP
21 | hostname: "url.com"
22 |
--------------------------------------------------------------------------------
/vars/firewall.yml:
--------------------------------------------------------------------------------
1 | ---
2 | firewall_additional_rules:
3 | - "iptables -A INPUT -p tcp --dport 22 -s 11.22.33.44 -j ACCEPT" # insert your ip here
4 | firewall_allowed_tcp_ports:
5 | # - "22" # enable this if you are testing with vagrant!
6 | - "80"
7 | - "443"
8 | - "853:853"
9 | - "53:53"
10 |
11 | firewall_allowed_udp_ports:
12 | - "53:53"
13 |
14 | firewall_enable_ipv6: false
15 | # Set to true to ensure other firewall management software is disabled.
16 | # firewall_disable_firewalld: true
17 | # firewall_disable_ufw: true
18 | # Rest is uncommented and will be handedeld by the role.
19 | # firewall_state: started
20 | # firewall_enabled_at_boot: true
21 |
22 | # firewall_flush_rules_and_chains: true
23 |
24 | # firewall_allowed_udp_ports: []
25 | # firewall_forwarded_tcp_ports:
26 | # - { src: "22", dest: "2222" }
27 | # - { src: "80", dest: "8080" }
28 | # firewall_forwarded_udp_ports: []
29 | # Allow only the IP 167.89.89.18 to access port 22 (ssh).
30 | # firewall_ip6_additional_rules: []
31 | # firewall_log_dropped_packets: true
32 |
33 |
--------------------------------------------------------------------------------
/vars/ntp.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Timezone used for dashboard and in containers for logging, cronjobs etc.
3 | # List of timezones that can be specified: https://docs.diladele.com/docker/timezones.html
4 | ntp_enabled: true
5 | ntp_timezone: Europe/Berlin
6 | ntp_area: "Europe"
7 |
--------------------------------------------------------------------------------
/vars/packages.yml:
--------------------------------------------------------------------------------
1 | ---
2 | packages:
3 | - "zsh"
4 | - "git"
5 | - "vim"
6 | - "htop"
7 | - "unzip"
8 | - "nano"
9 | - "apache2-utils"
10 |
--------------------------------------------------------------------------------
/vars/security.yml:
--------------------------------------------------------------------------------
1 | ---
2 | ## Rest is uncommented and will be handedeld by the role.
3 | # security_ssh_port: 22
4 | # security_ssh_password_authentication: 'no'
5 | # security_ssh_permit_root_login: 'no'
6 | # security_ssh_usedns: 'no'
7 | # security_ssh_permit_empty_password: 'no'
8 | # security_ssh_challenge_response_auth: 'no'
9 | # security_ssh_gss_api_authentication: 'no'
10 | # security_ssh_x11_forwarding: 'no'
11 | # security_sshd_state: started
12 | # security_ssh_restart_handler_state: restarted
13 | # security_ssh_allowed_users: []
14 | # security_ssh_allowed_groups: []
15 |
16 | # security_sudoers_passwordless: []
17 | # security_sudoers_passworded: []
18 |
19 | # security_autoupdate_enabled: true
20 | # security_autoupdate_blacklist: []
21 |
22 | # # Autoupdate mail settings used on Debian/Ubuntu only.
23 | # security_autoupdate_reboot: 'false'
24 | # security_autoupdate_reboot_time: '03:00'
25 | # security_autoupdate_mail_to: ''
26 | # security_autoupdate_mail_on_error: true
27 |
28 | # security_fail2ban_enabled: true
29 | # security_fail2ban_custom_configuration_template: 'jail.local.j2'
30 |
--------------------------------------------------------------------------------
/vars/selinux.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Rest is uncommented and will be handedeld by the role.
3 | # The state, either disabled, permissive or enforcing.
4 | # selinux_state: enforcing
5 |
6 | # The policy, default: see vars/main.yml.
7 | # The policy differs per distribution, mostly because Debian and Ubuntu use 'default' and other distributions use 'targeted'.
8 | # selinux_policy: "{{ _selinux_policy[ansible_os_family] | default(_selinux_policy['default']) }}"
9 |
10 | # Should the machine be rebooted after changes?
11 | # selinux_reboot: yes
12 | # You can enable (or disable) booleans by specifying them in this list.
13 | # selinux_booleans:
14 | # - name: http_can_network_connect
15 | # - name: abrt_anon_write
16 | # state: no
17 | # persistent: no
18 |
--------------------------------------------------------------------------------
/vars/user-management.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # groep:
3 | # - naam: apps
4 |
5 | users:
6 | - username: "username"
7 | name: "First Lastname"
8 | email: "email@email.com"
9 | groups: "sudo, adm, ubuntu"
10 |
11 | # Users to remove
12 | remove_users:
13 | - "user-old"
14 |
--------------------------------------------------------------------------------
/vars/zsh-antigen.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # zsh_user: "{{ ansible_user }}"
3 |
4 | # useful for deploy many zsh users at host, without duplicate and without write access
5 | zsh_shared: no
6 | zsh_source_for_all_users: yes
7 |
--------------------------------------------------------------------------------