summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-08 00:40:09 -0800
committerclarkzjw <[email protected]>2023-02-08 00:40:09 -0800
commit1204730924436ef9e1c7c49c9557837f9a5ed0e8 (patch)
tree129d79dfd11245751cee6d4082ff5d2f6e941610 /ansible/README.md
parent9635ac4dedf69de5bff65785bcc16bef80b52d75 (diff)
downloadmail-master.tar.gz
fork https://github.com/mattsta/mailwebHEADmaster
Diffstat (limited to 'ansible/README.md')
-rw-r--r--ansible/README.md67
1 files changed, 65 insertions, 2 deletions
diff --git a/ansible/README.md b/ansible/README.md
index f26ed5a..7b2591b 100644
--- a/ansible/README.md
+++ b/ansible/README.md
@@ -1,3 +1,66 @@
1# mail 1mailweb: Matt's Mail and Web Ansible Config
2===========================================
2 3
3Self hosted mail server 4## What Is It?
5
6This is an Ansible playbook containing Ansible roles to configure
7my personal mail infrastructure components including:
8
9- postfix
10- dovecot
11- rspamd
12- borg-backup
13- fail2ban
14
15Also includes web components for installing multi-site `nginx` servers.
16
17`mailweb` was created to apply on modern Ubuntu servers with a current
18release version of Bionic 18.04 LTS (meaning: packages are deployed using
19the `apt` module only currently).
20
21A full writeup about this architecutre is at [Building a Production Mail Server in 2018](https://matt.sh/email2018)
22
23## Organization
24
25To avoid mistakes like accidentally publishing all your private keys or
26backup passphrases, we take advantage of Ansible's directory search hierarchy
27to isolate non-public content from role directories.
28
29For example: to avoid committing our private keys to the public repository,
30instead of putting keys in a subdirectory of the role itself (e.g. `./roles/certs/files/tls/site-key.pem`),
31we place them at the top level `file` path Ansible also searches (e.g. `./files/certs/tls/site-key.pem`).
32
33The same goes for `hosts_vars` and `group_vars` using this insight from the
34[Ansible docs](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#splitting-out-host-and-group-specific-data):
35
36> Tip: The `group_vars/` and `host_vars/` directories can exist in the playbook directory OR the inventory directory. If both paths exist, variables in the playbook directory will override variables set in the inventory directory.
37
38So, we place our sample vars in `inventory/{group,host}_vars` for publishing in this
39repository, then for actual usage we write production vars at the top level (which overrides the `inventory/*` vars).
40
41Now all we have to do is _not_ commit top level `files`, `group_vars`, and `host_vars` directories
42into the public repository (only commit on local internal branches). This is helped
43by our `.gitignore` in the public branch. View comments in `.gitignore` for more details
44about private usage.
45
46
47## Contributing
48
49Contributions welcome! Any PRs about improving configs towards security, usability, performance, and cross platform growth is encouraged.
50
51If you want to make changes for your own needs (but maybe not for _everybody's_ needs), feel free to submit the changes and just guard them with enable `when` blocks activated by config variables.
52
53Hopefully we can keep this architecture alive as its package components and underlying distributions grow over time.
54
55### Potential Problems
56
57- Not extensively tested outside my personal environment
58 - there's probably default vars missing in places; feel free to submit fixes
59
60### Acceptable Improvements
61
62- Feel free to submit better cross-platform integration
63 - cross-OS package management (`if centos` vs. `if debian` etc)
64 - should include better version checking/version pinning so we don't try to load 2018 configs into older servers not supporting modern options
65 - cross-OS config file locations, handlers, etc
66- Update config files when [newer standards or features](https://matt.sh/web2018) get implemented and released
Powered by cgit v1.2.3 (git 2.41.0)