Compare commits
451 commits
nullmailer
...
master
Author | SHA1 | Date | |
---|---|---|---|
2e10714a79 | |||
9b5e1d78fa | |||
e86b17094b | |||
1d40950604 | |||
9820ae62e8 | |||
c6ac61aa53 | |||
7daa55ef98 | |||
8cc6e916b7 | |||
34b0ed5478 | |||
5485254c47 | |||
d5b0fd85c8 | |||
f6b12fd696 | |||
76f76a0ca4 | |||
8bcc0af539 | |||
f723c3e1a4 | |||
1281a6a51a | |||
15e2db49f3 | |||
5ae7126ce2 | |||
a5a4d28ccc | |||
e26d5dfc27 | |||
3d2ce8f79f | |||
a29a205576 | |||
f5f570f635 | |||
b00d5bc09e | |||
4b2868783f | |||
3830022279 | |||
d2c1b1c07a | |||
69dc3052ab | |||
dbe9dbdc27 | |||
5c780ffa62 | |||
765d24685e | |||
c291e836a9 | |||
89d0a682cf | |||
2a2702c6ca | |||
4a3ba6f366 | |||
|
a320907047 | ||
|
9e4b8c2509 | ||
|
a24b473566 | ||
|
70c8e0ebe0 | ||
|
5ab3dcdac2 | ||
|
9b53daf42a | ||
|
40d9108b37 | ||
|
2830558545 | ||
|
16a2d36472 | ||
|
733e9f555d | ||
|
7d9ff449a7 | ||
|
bcded46ed6 | ||
|
860a26a8dc | ||
|
fdeaa355ad | ||
|
456c6b47b8 | ||
b81af51ccf | |||
|
8c7031d059 | ||
|
67064484d5 | ||
|
50d9282316 | ||
|
265bd5fbb7 | ||
|
944e200394 | ||
|
f50778ca96 | ||
|
bc4dc03029 | ||
|
cc2ba9ff7b | ||
ba0be43845 | |||
|
d2331c18d0 | ||
1b9fc70649 | |||
8dca876bbc | |||
515222f404 | |||
2f3612fd8e | |||
475715c5f9 | |||
7db282fffb | |||
1ecffc2742 | |||
11937776c8 | |||
79c44554a3 | |||
7212154fbb | |||
e6363e9668 | |||
b3f25e2c8b | |||
|
e0328d0294 | ||
|
eb2abcfebe | ||
|
dd0d5dd4be | ||
3217e33eff | |||
a56cea369c | |||
2c238d17c3 | |||
|
3c85a2bfb2 | ||
|
cc3d5d9b7f | ||
a55efa8e24 | |||
|
fd0cb811a7 | ||
6986588fc1 | |||
|
45802cf65d | ||
|
4bd431f9c3 | ||
|
f0b8075ca6 | ||
|
a818fd8ed9 | ||
3c25e64516 | |||
|
40a91da78b | ||
|
f0631e341b | ||
|
3ccdacde13 | ||
|
b6d5f4206a | ||
|
511091c808 | ||
|
b827195c32 | ||
|
4cf4ed0964 | ||
|
c49dfb24b0 | ||
|
747c93139b | ||
|
2a9e1f4def | ||
|
9bb2d3f324 | ||
|
1133f614e4 | ||
|
446c02da5e | ||
|
7bdf66f73a | ||
|
278928550c | ||
|
9481af3201 | ||
|
daac91f3af | ||
|
a0dd5ef4b7 | ||
de22345d79 | |||
|
03a9281b88 | ||
de0022e3f6 | |||
|
cdaf3dc77a | ||
|
5bc84dbdd2 | ||
|
0979370418 | ||
|
14b6a68040 | ||
|
cc6f96bbc8 | ||
|
07a0429ae0 | ||
|
ce04f937db | ||
|
1009298023 | ||
|
ea394a01db | ||
|
82fdcd026e | ||
|
b82afd13d9 | ||
00d63cf082 | |||
|
a791cda652 | ||
|
fdfed1a05a | ||
|
e2acfd4031 | ||
|
c7f94b54c8 | ||
|
aba0370c5b | ||
6bb02815e7 | |||
|
a523b29ac7 | ||
|
7b82a3f7ea | ||
b3838ee2a0 | |||
|
7f53120966 | ||
d23dbe2d49 | |||
|
eed6ec558c | ||
|
2ac9c40579 | ||
|
3efc8179bc | ||
|
3a56439fac | ||
|
94b8f37302 | ||
|
1392e3fe64 | ||
|
cfb891d10c | ||
|
11b3738fcd | ||
|
b2a17e20f2 | ||
|
311cfb223b | ||
|
6e77b4cb3c | ||
4ccd33eec1 | |||
f60795beaa | |||
bae87c809e | |||
8b54121a87 | |||
4a594bf1cc | |||
5d3d965112 | |||
73e522f0c6 | |||
94a470b7f2 | |||
b31f9bd952 | |||
cc3b4294ae | |||
f17e7f7524 | |||
0bfc631465 | |||
c5e6fbcfdf | |||
91fe213e02 | |||
7ca7c27fec | |||
db969625cd | |||
54b073bd02 | |||
ab697bafce | |||
e6b6790f63 | |||
cca10e7cc9 | |||
ab11e6cd65 | |||
bd1343cf03 | |||
b7ead19d50 | |||
bb97bca456 | |||
4f66702f15 | |||
9296a2ed91 | |||
4f2f0ffe64 | |||
c8a877282f | |||
d89d88813f | |||
c6b768e1bb | |||
926790844b | |||
ceaf75f0ad | |||
2c82653383 | |||
05f76c7586 | |||
604373db03 | |||
b29e9c0e45 | |||
cc681e4fac | |||
f50586c476 | |||
9c47067f93 | |||
3a600d9061 | |||
dada40e005 | |||
1520ad92c8 | |||
f409fb53cb | |||
11d0b46ef0 | |||
013743f910 | |||
1b0bff4c51 | |||
fde52f2e42 | |||
e4d2416722 | |||
226b55b0d1 | |||
5c08fed9de | |||
2d9d66c16d | |||
fd5ad8d5ac | |||
5d9a6599e8 | |||
3320e3e0c6 | |||
676cc716cf | |||
954e3e0892 | |||
|
8c666151d6 | ||
d891559e28 | |||
1908deee9c | |||
|
4c8550bfe1 | ||
e2b1f8eae5 | |||
6e376a72e3 | |||
6c64bb214c | |||
764f0f106d | |||
bdcdb8ceae | |||
7d99cef57c | |||
ca3d89e671 | |||
749188e297 | |||
c48fe1ae17 | |||
304437da97 | |||
9d18ebb7f1 | |||
6775d9ecde | |||
9ebdf15bb9 | |||
dd48302585 | |||
45041be2ab | |||
|
3d1d787063 | ||
9ed7441e34 | |||
|
28714ecf95 | ||
|
a33ea29637 | ||
efa428fba0 | |||
|
e3c56e7d46 | ||
82f05482d0 | |||
73749e9e6b | |||
|
6afd0cb4ac | ||
|
f7529be904 | ||
d2787479cf | |||
|
aac4c05cd3 | ||
|
6b2bc60589 | ||
|
e2f5529498 | ||
91817b324c | |||
1c3127dbbe | |||
f80435cb31 | |||
06f101527d | |||
|
2388bfdc3d | ||
83f5b35e59 | |||
35286a661a | |||
11335a6077 | |||
083fc4da9a | |||
f69dfd8799 | |||
5d681a95ea | |||
a743ce09fb | |||
bc35cd8e90 | |||
5bcc428895 | |||
eeaf0f8486 | |||
e247aa3f70 | |||
|
424aa80d8f | ||
|
e17f58111f | ||
ac05da7173 | |||
8ab4159d38 | |||
dff0d9922c | |||
dd274891a5 | |||
cec907af48 | |||
2952c39f70 | |||
3de76b0ac7 | |||
cccd9ac598 | |||
|
6104782a37 | ||
85e691a0a2 | |||
606df65535 | |||
3030d3bfab | |||
f59d9ee6f0 | |||
|
9f671e71d6 | ||
d567ded046 | |||
|
6d74f04db4 | ||
21eaeb2d42 | |||
|
789c11c3e3 | ||
465ab398c0 | |||
a1533b7efd | |||
ffbedf6d35 | |||
f662e4bd47 | |||
3000f46c46 | |||
6f927e30f3 | |||
8524b9fa99 | |||
37582abfe1 | |||
96a498c6de | |||
|
d902b71e04 | ||
1be92bad62 | |||
01bca6597d | |||
|
eabd709ec7 | ||
|
2d8897e9f9 | ||
21a3d5af2a | |||
|
4305a60639 | ||
3f3f688da4 | |||
6713b550b6 | |||
cb3ec07121 | |||
243ec1fe9d | |||
e12f67c920 | |||
f8e5f0cc76 | |||
|
45220cdebd | ||
f15b222cdc | |||
a54006c9d4 | |||
6f36506a98 | |||
41eb446114 | |||
7480a7c565 | |||
59f2c94a61 | |||
e570ce67b3 | |||
b14b359027 | |||
33a1ec02f3 | |||
ebfc4f2a26 | |||
0b5562f3f4 | |||
86f8b31159 | |||
d9f1104309 | |||
c6cae75031 | |||
46d10022ea | |||
ff750c5b63 | |||
2651432582 | |||
c5afbdbde4 | |||
d928c7f7f0 | |||
021a5ef1e8 | |||
c99b611b8f | |||
8112788396 | |||
2f2f71422f | |||
|
25e05069de | ||
ac42401d6d | |||
a43a9839f8 | |||
|
11578494ec | ||
637b74a2ad | |||
f45cd77510 | |||
|
715d332d25 | ||
65c94d8e84 | |||
4150a77649 | |||
a01a2095d6 | |||
98171e449d | |||
8ec838962d | |||
bdc59049ae | |||
f6e1949c21 | |||
1611f4a93c | |||
904678d1ac | |||
965bbe62a4 | |||
d7a4995496 | |||
d16676bfb6 | |||
cdcfad7ac2 | |||
29f2823960 | |||
454bc66ae0 | |||
3f8ffbe164 | |||
4123af6c01 | |||
531f7593d2 | |||
313314a674 | |||
4642395330 | |||
f0f56ecd3f | |||
7cf616f6c7 | |||
2ea7f6f9f7 | |||
db8dbb6c7a | |||
|
2a6c2b30de | ||
|
7a691882f3 | ||
69516012a2 | |||
bcc492339f | |||
|
e5299d8087 | ||
|
f6dfd792d3 | ||
|
40cd5c71ad | ||
|
472feb2dc0 | ||
077858724a | |||
38386fa1a0 | |||
|
7c7de51903 | ||
|
a31f57e844 | ||
|
974fcff1d3 | ||
6125856c60 | |||
a64864150f | |||
d233fc2759 | |||
14532d88db | |||
|
ebb3c894da | ||
df4bee2980 | |||
6095d9cef9 | |||
630377edad | |||
b3fa8a455d | |||
5871e1cfb8 | |||
d16f444130 | |||
4f6eda8329 | |||
628e11488d | |||
bd05b702bb | |||
06b54d5f89 | |||
40eadf802c | |||
8e855d7009 | |||
7a07155237 | |||
36b04239fd | |||
f919ec689a | |||
9ef6202fdf | |||
879e033857 | |||
ba4db4a835 | |||
bbf4ac323c | |||
d815434360 | |||
76361de3f1 | |||
69c6d5b55d | |||
0656dacbe8 | |||
6951e017b7 | |||
1105ea88c1 | |||
8b9bef865e | |||
dbbaf0d26d | |||
a4c393d3fb | |||
d14306a86c | |||
a625a58ddd | |||
64ae2a8521 | |||
|
452b605fc2 | ||
2c0727a419 | |||
|
41779fb172 | ||
deb4372588 | |||
2e912fc47a | |||
929baa300f | |||
71ee06c9c0 | |||
bc2701d8ba | |||
2353589da6 | |||
1d0200a1f0 | |||
b81600aef8 | |||
7e92fdfab7 | |||
|
e6a86640de | ||
cf07de4ec4 | |||
|
7cc478b1ad | ||
b9269f3967 | |||
e5be09656b | |||
8abca7916f | |||
763cc2eb51 | |||
eaa0d2e0fc | |||
8ae94fa8f8 | |||
21fed6ae3f | |||
52124d2cad | |||
7d527be1c0 | |||
32669e1fb1 | |||
4ca7ebd144 | |||
802bfcc698 | |||
958eaa1bcb | |||
6525508401 | |||
77a5fdac6f | |||
5d319cf167 | |||
529550f594 | |||
ee041b9ead | |||
1f6bfeee23 | |||
0f55b90de9 | |||
b13b22da05 | |||
8f815a30c5 | |||
acd5721a5b | |||
9547868c7d | |||
cdb9f88614 | |||
9eeb8ccd73 | |||
1fe8d1d28b | |||
9252249d18 | |||
e4b58c0bf4 | |||
c65b3f090b | |||
f7183095c1 | |||
ba8b4e8c29 | |||
02a8cb84df | |||
4a43bf8a16 | |||
7fd1b5ff5d | |||
6263c31785 | |||
89181c6cd6 | |||
c3d24c1cd0 | |||
a35488efdd | |||
3050a95699 | |||
85d0dc9621 |
174 changed files with 5767 additions and 2820 deletions
|
@ -2,9 +2,9 @@ skip_list:
|
|||
- no-changed-when
|
||||
- load-failure
|
||||
- document-start
|
||||
|
||||
warn_list:
|
||||
- experimental # all rules tagged as experimental
|
||||
- meta-no-info
|
||||
- ignore-errors
|
||||
|
||||
exclude_paths:
|
||||
- group_vars/all/vault.yml
|
||||
- utils/
|
||||
|
|
|
@ -5,8 +5,7 @@ name: check
|
|||
|
||||
steps:
|
||||
- name: ansible and yaml linting
|
||||
pull: never
|
||||
image: aurore-ansible-lint-image
|
||||
image: quay.io/ansible/toolset:3.5.0
|
||||
commands:
|
||||
- ansible-lint
|
||||
...
|
||||
|
|
12
README.md
12
README.md
|
@ -2,8 +2,9 @@
|
|||
|
||||
# Recettes Ansible d'Aurore
|
||||
|
||||
Ensemble des recettes de déploiement Ansible pour les serveurs d'Aurore.
|
||||
Pour les utiliser, vérifiez que vous avez au moins Ansible 2.7.
|
||||
Dépendances requises :
|
||||
|
||||
* Ansible 2.9 ou plus récent.
|
||||
|
||||
## Ansible 101
|
||||
|
||||
|
@ -88,8 +89,11 @@ On va utiliser plutôt `ProxyJump`.
|
|||
Dans la configuration SSH :
|
||||
|
||||
```
|
||||
# Use a proxy jump server to log on all Aurore inventory
|
||||
Host 10.128.0.* *.adm.auro.re
|
||||
Host *.adm.auro.re *.pve.auro.re
|
||||
# Accept new host keys
|
||||
StrictHostKeyChecking accept-new
|
||||
|
||||
# Use passerelle to connect to administration VLANs
|
||||
ProxyJump passerelle.auro.re
|
||||
```
|
||||
|
||||
|
|
31
ansible.cfg
31
ansible.cfg
|
@ -1,38 +1,17 @@
|
|||
# Ansible configuration
|
||||
|
||||
[defaults]
|
||||
|
||||
# Do not create .retry files
|
||||
ask_vault_pass = True
|
||||
roles_path = ./roles
|
||||
retry_files_enabled = False
|
||||
|
||||
# Use inventory
|
||||
inventory = ./hosts
|
||||
|
||||
# Custom header in templates
|
||||
ansible_managed = Ansible managed, modified on %Y-%m-%d %H:%M:%S by {uid}
|
||||
|
||||
# Do not use cows (with cowsay)
|
||||
filter_plugins = ./filter_plugins
|
||||
ansible_managed = Ansible managed, modified on %Y-%m-%d %H:%M:%S
|
||||
nocows = 1
|
||||
|
||||
# Do more parallelism
|
||||
forks = 15
|
||||
|
||||
# Some SSH connection will take time
|
||||
timeout = 60
|
||||
|
||||
[privilege_escalation]
|
||||
|
||||
# Use sudo to get priviledge access
|
||||
become = True
|
||||
|
||||
# Ask for password
|
||||
become_ask_pass = True
|
||||
remote_user = root
|
||||
|
||||
[diff]
|
||||
|
||||
# TO know what changed
|
||||
always = yes
|
||||
|
||||
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
|
|
20
copy-keys.sh
20
copy-keys.sh
|
@ -1,20 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Grab valid unique hostnames from the Ansible inventory.
|
||||
HOSTS=$(grep -ve '^[#\[]' hosts \
|
||||
| grep -F adm.auro.re \
|
||||
| sort -u)
|
||||
|
||||
# Ask password
|
||||
read -s -p "Hello adventurer, what is your LDAP password? " passwd
|
||||
echo
|
||||
|
||||
for host in $HOSTS; do
|
||||
echo "[+] Handling host $host"
|
||||
|
||||
# sshpass can be used for non-interactive password authentication.
|
||||
# place your password in ldap-password.txt.
|
||||
SSHPASS=${passwd} sshpass -v -e ssh-copy-id -i ~/.ssh/id_rsa "$host"
|
||||
done
|
||||
|
3
deploy_all.sh
Executable file
3
deploy_all.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
# Deploy all playbooks
|
||||
ansible-playbook playbooks/*.yml $@
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
# Deploy a correclty configured postfix on non mailhost servers
|
||||
- hosts: all,!unifi
|
||||
vars:
|
||||
local_network: 10.128.0.0/16
|
||||
relay_host: proxy.adm.auro.re
|
||||
roles:
|
||||
- postfix_non_mailhost
|
|
@ -1,7 +0,0 @@
|
|||
FROM python:3.9-alpine
|
||||
LABEL description="Aurore's docker image for ansible-lint"
|
||||
|
||||
RUN apk add --no-cache gcc musl-dev python3-dev libffi-dev openssl-dev cargo
|
||||
RUN pip install "yamllint>=1.26.0,<2.0"
|
||||
RUN pip install "ansible-lint==5.0.0"
|
||||
RUN pip install "ansible>=2.10,<2.11"
|
|
@ -1,18 +0,0 @@
|
|||
# Ansible-lint image
|
||||
|
||||
In order to build this image when a new version comes out, you need to
|
||||
1. ssh into the `drone.adm.auro.re` server
|
||||
2. git pull this repo to the lastest version
|
||||
3. optionally make the changes if it has not been done yet
|
||||
4. `sudo docker build -t aurore-ansible-lint-image docker-ansible-lint/`
|
||||
5. ???
|
||||
6. enjoy
|
||||
|
||||
You can verify that the image was correclty built by running
|
||||
```
|
||||
# list the images present
|
||||
sudo docker image ls
|
||||
|
||||
# run your image with an interactive shell
|
||||
sudo docker run -it --rm aurore-ansible-lint-image /bin/sh
|
||||
```
|
40
filter_plugins/net_utils.py
Normal file
40
filter_plugins/net_utils.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
import ipaddress
|
||||
from operator import attrgetter
|
||||
|
||||
import dns.name
|
||||
|
||||
|
||||
class FilterModule:
|
||||
def filters(self):
|
||||
return {
|
||||
"remove_domain_suffix": remove_domain_suffix,
|
||||
"ipaddr_sort": ipaddr_sort,
|
||||
}
|
||||
|
||||
|
||||
def remove_domain_suffix(name):
|
||||
parent = dns.name.from_text(name).parent()
|
||||
return parent.to_text()
|
||||
|
||||
|
||||
def ipaddr_sort(addrs, types, unknown_after=True):
|
||||
check_types = {
|
||||
"global": attrgetter("is_global"),
|
||||
"link-local": attrgetter("is_link_local"),
|
||||
"loopback": attrgetter("is_loopback"),
|
||||
"multicast": attrgetter("is_multicast"),
|
||||
"private": attrgetter("is_private"),
|
||||
"reserved": attrgetter("is_reserved"),
|
||||
"site_local": attrgetter("is_site_local"),
|
||||
"unspecified": attrgetter("is_unspecified"),
|
||||
}
|
||||
|
||||
def addr_weight(addr):
|
||||
if isinstance(addr, str):
|
||||
addr = ipaddress.ip_address(addr.split("/")[0])
|
||||
for index, ty in enumerate(types):
|
||||
if check_types[ty](ipaddress.ip_address(addr)):
|
||||
return index
|
||||
return len(types) if unknown_after else -1
|
||||
|
||||
return sorted(addrs, key=addr_weight)
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
glob_nullmailer:
|
||||
root: root@auro.re
|
||||
smtp_server: smtp.adm.auro.re
|
||||
defaulthost: auro.re
|
||||
allmailfrom: root@auro.re
|
|
@ -17,9 +17,7 @@ ldap_admin_password: "{{ vault_ldap_admin_password }}"
|
|||
ldap_admin_hashed_passwd: "{{ vault_ldap_admin_hashed_passwd }}"
|
||||
|
||||
# Databases
|
||||
postgresql_services_url: 'services-bdd.adm.auro.re'
|
||||
postgresql_synapse_passwd: "{{ vault_postgresql_synapse_passwd }}"
|
||||
postgresql_codimd_passwd: "{{ vault_postgresql_codimd_passwd }}"
|
||||
postgresql_services_url: 'bdd-ovh.adm.auro.re'
|
||||
|
||||
# Scripts will tell users to go there to manage their account
|
||||
intranet_url: 'https://re2o.auro.re/'
|
||||
|
@ -89,3 +87,24 @@ apartment_block_dhcp: "{{ apartment_block }}"
|
|||
ipv6_base_prefix: "2a09:6840"
|
||||
|
||||
is_aurore_host: "{{ 'aurore_vm' in group_names }}"
|
||||
|
||||
# Borgbackup
|
||||
borg_keep_daily: 7
|
||||
borg_keep_weekly: 4
|
||||
borg_keep_monthly: 12
|
||||
borg_backup_directories:
|
||||
- /etc
|
||||
- /var
|
||||
borg_backup_exclude:
|
||||
- /var/log
|
||||
- /var/lib/docker
|
||||
- /var/lib/lxcfs
|
||||
borg_encryption_passphrase: "{{ vault_borg_encryption_passphrase }}"
|
||||
|
||||
borg_server_host: 10.128.0.4
|
||||
|
||||
rsyslog_outputs:
|
||||
- proto: relp
|
||||
address: 10.128.0.241
|
||||
port: 20514
|
||||
...
|
||||
|
|
|
@ -1,179 +1,246 @@
|
|||
$ANSIBLE_VAULT;1.1;AES256
|
||||
32313562646230353138303964366135656361616532343933353732313961323339653964353130
|
||||
3938346666633565356134343835633964626261363365370a663664663938383731343733386136
|
||||
33356531323762313463326339333963336636353933326537333665313334616563626632336663
|
||||
6537363033663935660a613366613962626563643035663330343061353836646561623031323236
|
||||
65313633383063373064613930623530656365396335663363643330636239643937373163623932
|
||||
61373136303737333739316565323934376433316362353935363637373264616238373831666438
|
||||
35343135383233653963333237393232353631636566373766366664656666313436323535393736
|
||||
62323731343261373331393062633030356235313834373861323138663930613332643432386436
|
||||
38383038616536316465343561643639353434396631643033633537393265646532613161343732
|
||||
32363265643963386538326639353233363438643833306637336431303533396562613863633537
|
||||
30303334643137313136633039393463346562306236353566333563633238313865313534326137
|
||||
33623036376439653532313833633135326631643361333463633162303065623633636331666661
|
||||
62303636653233666164383463356530633464306564383236373832616263653165373937303030
|
||||
31323865656436366265303537306438303434613135396166313635656566373539303463393830
|
||||
65383636363064333730623161316162373734626433346564333835393030616437636665316566
|
||||
37353937626465383439633534316336313931663561336335653761396230393031393839336264
|
||||
37623037663032646631656637386366333131356562376665333964393264643133626532653564
|
||||
32353235633434656334663233303664613865343039613330663833396162646430623735653434
|
||||
66633466306338373061326636366330643639383632353564353865623637303832306332653131
|
||||
37343566393965326635613135613134316264616336303233616162313839626235386137343435
|
||||
33633336636434343531633362633834376135303337363637303039323038313937646236366265
|
||||
34303434373566313730623664653263653466366133363562333736393836393363326665353434
|
||||
30333263323366326436623238353335323936346637646130623265366535653737343665373165
|
||||
63336166633831623464343862353065653162613934646539396364353162633063303332313266
|
||||
65656163396463363737663931353765376337643065646131303264363961366336343432653537
|
||||
65306437623535393132343962333666366665316362366536663431646435633166333731303232
|
||||
63313337353334623330623862386661306333366638306433373437623835636631376231373636
|
||||
66666539363561313166396438343730656230663532633031353336636565343964366136663466
|
||||
38316364663936303231633633613832313163646262313238346666336661613236343966353130
|
||||
62656237663865306632333130653933633332623061633062363964643130383430613864663935
|
||||
63663765356434626661346165653163626565336437613539653536306432376332616430393737
|
||||
34366139336363383761366338623236383135373634613239616665343061396633383231663230
|
||||
63653331336366666234626662356461663263626465663036326162343239373734346661626665
|
||||
61666231613565356633343030343935393135653261376239303037373634386138393463363239
|
||||
30356365663133646634333863616230646235656135336330393836353462323630376537366334
|
||||
31306330363232326661616666623131383837353139643838326430653561346565393762323936
|
||||
31623136656361383039653763613162356530653933376539336130376237396661663664393733
|
||||
36396433303339613965316230613237303331646331383239356638333366653961303138343663
|
||||
33393664303637333863313364356666383836633063643539333262633565623534323866316537
|
||||
38623630363139643837396330353463303932383231663831363763656537386531383531303165
|
||||
37366338343063346230656461393832383736636662656666636434363731623437303862636366
|
||||
33613333393139613637623963373262323637653531336265333033333135613330313166633738
|
||||
36353935383931363535656539333130653164613431616438613432313532373063353738656162
|
||||
36616563383133623336396633343762376537663432356238653766666636323232623065313537
|
||||
39636632326166323130646633626431323831373963313837613465356436326430616433303662
|
||||
65343834663937306539663330366538643265626665613631323036616463313266303237613938
|
||||
30613565306636306561643238326138623366343365303934306561623234313332636462383363
|
||||
30623432326336396364636164366463326533613665333830656564626663383331323661663934
|
||||
35353135323930656138373830623932396138626335343265623738383532333861306561323430
|
||||
66333532333961636463656535636132323535313730333762633139306235373031363831363266
|
||||
33646635316137616663653461393566303432386330623936633330373461333762356532663062
|
||||
39666437363931313861356331653932303132353364623664656364316430653933653935616230
|
||||
38376631316463646663626562366233626334323235633235653364623936643131356130343261
|
||||
36396535393335366532313930623363663032386635396262363430303466373737633739626435
|
||||
30636136396562336561393936353763383732653166353266376165663233626266353638363131
|
||||
65323462633039323334613566373434343363633532656534663635363763396265663137636331
|
||||
38613736353635613437663133616431396666316230393066343431336535626335373437393039
|
||||
63666135353937313765316134326338376161353862373161653039333631306264343464353035
|
||||
65353639313134346239646362663836643734373465353866373238613162303336306438376237
|
||||
35363934333536376136666561333636653136316435316530366461306636333063313739626630
|
||||
37633333333766613663636466373364663132613266343136376138663461383832356631303132
|
||||
30363434336161393962363636313364663839383734373533356663343733333731613535646433
|
||||
64396361643736653931336365313338313633383038306131333863306437386362633263646364
|
||||
36656566326333333136636566613066623362363263373435356162396431396334386237383231
|
||||
30326465646334613235666435613462633230353434653666336364646466613066346366376262
|
||||
66633863333461626631383961663930383663666538613162643730323565653732386330613538
|
||||
38666164353130386530376332643637333931313661633634303636643639613561643338373331
|
||||
63333932306634313933366533623837613934366334396637396361623439383964333665383435
|
||||
62316265356537616137643537366666336634393935613034393737313930333364323031653234
|
||||
37366561356332666439623462396266623961653039626562393065393336643962373064343563
|
||||
36346665666338623931343739386531343833386135356164303532643463346565316163656633
|
||||
32616365623065626139383362613466633332666133313263393062373338653834363830333039
|
||||
62626230343362393533633061663432363836616539643065643839623065633363393134643534
|
||||
63343935376537393739333063333333386239663763383435633234376434366362616433363162
|
||||
34363539633661633333306133363433313761303138363864373266333461303139613362663937
|
||||
39626332356139396330393361613364643363366164376234316266316164393035386334366362
|
||||
36373065626530333237636139336163623766623561656234333239646263626164323134633434
|
||||
63326635393665333533383562633438303036616262366435373739386430353964333265393732
|
||||
66643838303566626131323834646564613830333937616264383864316666343333396636303836
|
||||
38633335656536653334626530303835623531666665326533303535313164323836373365636265
|
||||
65393061363933373931396134623264643065633534313566346336343862346537343437363765
|
||||
62663264376266326538616330376633353832353234653661613964373231666562326466663934
|
||||
38393931643736626332623461613737383463663935656263656233306437653331343838343865
|
||||
64343239636166343134336261656162393938396633376663366466653634373566336165323237
|
||||
34386137313961653739393231616532346664366138356631353030623236343535363435636462
|
||||
32323564306339396437633763613535393230386631616166656539373861386633363464653439
|
||||
34323134626334356631623764356232366337646236313031336138333636633834353463363961
|
||||
32316664383038633330383765356563353062303133333133336365346561643234386161383461
|
||||
39323964303061313461386333613961396533646161663230666466616231386239386666306233
|
||||
39343239323739323738373263313662336237346663663432343861343034633463386163303366
|
||||
38333537626232663438383230623032623765336164653438653434396362633063333437366338
|
||||
34373431323539306531323536363238333037643337626131336631356537626237656630393964
|
||||
38393736633433306632323334613232303162313962616334376130353931336337303462363266
|
||||
39643137643034396564303531346361336134353461653535336165323032323238663631653935
|
||||
38366339366436376166333335663230306663633634336434323532316664666134313365323834
|
||||
31363964346561373262393632366637396633323332393162666166326631383164643265353135
|
||||
34303664353434373131653530346634386333663732373966613761616261323032336266646163
|
||||
32663966656464633565356337653534623962663939333033613933633965666339653764663134
|
||||
38363965393730633638653561393432303835303164396462366435353030643966316665333061
|
||||
39643634646137626338323537393031356532616637666634333139396630663930636235333735
|
||||
66336465666439356636623037653564393161393432346534656132346631396462356463336566
|
||||
30303833386638333866396462633330306439613139636331636331333663386438623461343133
|
||||
30643164366434353765633738356536643861303232393362343131353730376364623463326361
|
||||
37363061623333653466636438666465616133396233616430393265626362663736613031383764
|
||||
63353065306166646461623763643062383738376266353765643134376538393233383663346237
|
||||
37643639663063383266373536323533343936633134386263616163343637613636303134343037
|
||||
34626232303335393532643134646132323463396333386664333731646331343937363661323539
|
||||
65663936366464643162633432666537393439313664643638343237653566613235353165663336
|
||||
32373037346239356337633036306138343366666463363538373836616530313565613562383433
|
||||
64616263626165343938363230613039356137643665653734366533393033316363663036363738
|
||||
66323663663366666162623734363465663939383830396533383665393139633530616263663136
|
||||
64333132633031623835373831636366643831626235303831313761653734666365386462393534
|
||||
66303332656561653162636636313439663633396638353638363465663138353866376636326634
|
||||
63613865613466326230323564323439393061653664393261373531306235333663373434636262
|
||||
62353132653333313635653633346461323165373862343839316539653038633664353830643234
|
||||
36633763653738323732386263643461333761306532303534663763323735636563366266653464
|
||||
66636236393033613736656562663661346162316164616663306465623431613133633130383136
|
||||
35313434346164653163396137383064656538353766653237646237663639663039663665666236
|
||||
62346139633234343735303762653030326333333764356562656435623330663066353333326239
|
||||
39646465393362323537343766366432323765363139643361643037373739643636623437386636
|
||||
32353233303337623136343062623633306361383737303431613663633163643832343434656335
|
||||
39633434393466646366376534333865633361333861653366316238626637363537303335363662
|
||||
61353830303733623665643864333134623062356334616331363565333235666261653732633264
|
||||
62663238663461343738303764303636366638393830623264613730303635623635626364646464
|
||||
35623239356235316136343532616638663930313565383264663936633733386663326161623830
|
||||
62626634313963323866653432343561303233343035353433613731353538356438613033346638
|
||||
33613466656633626261326465336437613630376335663933303061393731313065636131393762
|
||||
65613037653363636235613838613535316635613066393436356537633662313539323163613361
|
||||
36356632323634363335366665376663346565393439313031636331633235333664663830636135
|
||||
64653266616262336437623731383161383437613461323837653066656233643230663064616432
|
||||
65383337323333633465316533623465303735396430326334643634626436303263396534356335
|
||||
34373134653232303866386433643864363536643138353965323130616338353731633434326361
|
||||
66303133353264343664323435653133383431626263373237613631616235666465616333343937
|
||||
37323333653565363665376236396232393132336137346461613831623063326631636335333365
|
||||
65376538396265313732323932383061633464393630393563386163393230623238633938396535
|
||||
34333330386131353336646361313634353862663762653234373235366565343232306432653731
|
||||
61383863306632626463653831383735636233623966353130626634366638626236383864316531
|
||||
37353062336539626531356133313132663330663135393930356565323364353761393439373533
|
||||
61366465313462313033306631333432646163653832363564313838643362316263353562373262
|
||||
33343664666230303065373836306663643135303439356362336634346637353438633364306365
|
||||
30623332363436353865633738663464636132306134386465306164363333386338323433643163
|
||||
37626235303062393933393363656339636139323464373439363765316266646536316336666163
|
||||
34306262326238343937623432643262646263666266623933623565363535326235623637396237
|
||||
64623961663037653033383933333062393932613933303962326538333739303731363137623365
|
||||
30363030353433646133666166383938356232396331656165343531343232613934663834633464
|
||||
36353331373233393861636131393238363031383135613633373665613364373466356663376431
|
||||
66303331383837663261313838363266656164633836623661326331356566653938306266376632
|
||||
63613238356135373938663030343634393566653963306237303138626461613931356565663835
|
||||
64386433613937643730396130663333646334386336613864333533626661626166346232333964
|
||||
66316664346231376639393132613936323261383131633737386331343966363961633237666334
|
||||
38353363383761333439373437623937393534626435386262383732363833346166656233666332
|
||||
62636130323536663432633434646666303664393130626437636132316264613535306463623964
|
||||
30633030613665343631373366363737313130666337326230633631646461356362363963306361
|
||||
64393639353339303436346438313833333432356666666339613666623132636235383866343838
|
||||
36666263343538633537303665616366656363373736306235333264336466313939356131303561
|
||||
33363030653966316232313933323665663330303338366333656536623861623537313266383565
|
||||
65633866663665393635646531353539623362646663356664333866623432333465333335333333
|
||||
31616262356537646261373166343665633238633235373335343134393366663462393465643135
|
||||
35326336613835663132343233386564373462353561333066323631313664373865323233653336
|
||||
65333731336565633664636562326365343263373263373162653239633964396138616335616230
|
||||
63376562383064663330363562306338346465666563306365306639353632396633323830353337
|
||||
65666233376239333436633566623535383065646235353832363030303565623531333539613864
|
||||
63393339656238323466343564333134636164383062613138656138373936636531636166393062
|
||||
32613431636233316533353937326234663336343231313630393037313663383034383238346562
|
||||
36383264626366383835623261643562323037303661383832323939363939623038626664393530
|
||||
65353061313266633764353331313532383766613735333131373365366336306139343265306634
|
||||
66313435313965633362356563313763653634643362616138633832633136333362343731346166
|
||||
34613431653134363732353833643962636431623036393935666237663833373934373438666434
|
||||
36633538306632383439323465636665303863646532653165666638316137633738363736386633
|
||||
33303234306531356136316463353232303737323661333430333137636633306131316434376665
|
||||
64323633383735313536373534626331356631316464643530363866633730353239346633396364
|
||||
36323437306165363465613365383666353037313333653230316234626439623964343336343762
|
||||
66343831343133343330336536613134303836626434663731343636613835623364633236653962
|
||||
63356635363239663533336265306261393337313136313937356662616231636461373230376232
|
||||
64313738333966633265626166653266313932666134356235373238376530303437646464333364
|
||||
31613631386335356561363938323831313061373566323638663864393266656361366463353736
|
||||
63386361373737383837336435633562626566656666373737313464323466313364626466633537
|
||||
6661656232313066363235616364646663623039386561636332
|
||||
64313161633263303464663933363265373935633862653634643862343232643432343966376438
|
||||
6134633764383937373966346538306530316539303966320a363035303038616435383366656532
|
||||
39346463396563626166333362306464343836386365303836356461323663633831636562393039
|
||||
3832636432626238350a666566323435623834396166656233306639333830343130326265616234
|
||||
61666365663963643437386530363261306438376665386463376366363662656161316263303831
|
||||
61393136363934316462616131326463333736656136643038623061313363386538393833663637
|
||||
36373565333566306632313865646538633532393731313430633462666334323762653337383338
|
||||
63313433333835653366363061343839326131666139346563306366656365316663333438363837
|
||||
33323165353936343165646464306434303161313139653561346461653537616164623434376534
|
||||
33666662343734633766356230383761353239333632613031396365346536373432363433633564
|
||||
61633762393033343336373864653438336436613630366539333731383336346665313732396265
|
||||
32356138666135383562656366353131366436363464643630656130303437623131333239386363
|
||||
66373866393064306565306565386230373638633733326661333065633136633130323963323765
|
||||
30353262323835313365383562326363343965636634376133613331363133313030346561653931
|
||||
39363636636235646131353034663861336362383263613165323230366439383561653165363764
|
||||
65366130623362623539393461363832353435616266393036386439303834316635366438393936
|
||||
33383933366262636232383066663130383965306137356363363539633661373664613738336539
|
||||
31363131616135623039346465623530376533386263343836376662316562386530336266303062
|
||||
64386531303938623939653635313163633261336339366139666135323130653862346132646636
|
||||
30363065303235346331333434653331646333616337623562643564366435613938643235333664
|
||||
30626164373030303237656366623631396138333265383566333664663061613536666363623630
|
||||
61623362383439636239336234333161366635306432363230366630383836326330343932303863
|
||||
39393232373831363863333332636362396639663831656266336430313837666463336439353332
|
||||
63303036633433323439613535326663633332346565646338353761363733643766363132666365
|
||||
34303865656262303563323665363730663062626537363461646363636461633762663237366366
|
||||
64393133656464643065633634313261336662646435313735306266316132636530393631353830
|
||||
61303939373363323131316463333136326365333430626266376636356130396239323464353937
|
||||
64616232373532396334343433636332353530386662633164353235626361623164313039336666
|
||||
31636434666437393839393133633961373139313663616366373239386163623064373836376164
|
||||
62316638366366376134386231306435616138656461373633393339653532363434393834393430
|
||||
37363335623934306661333135343266663464623438353665613330356236323036363139643064
|
||||
62383934363465316338393065383935646134353230376131613935613431656333383565353134
|
||||
34643866353131653061623236306536363163373639396564336434653839346263303930633663
|
||||
39393935636235313431303032336361313730373238333732626465346662363038636361383631
|
||||
65393433346363366337383233646166306339653533646632623262376630383265393438326135
|
||||
31643039333835666338383762336163336337343532393063323165636531353361613731363065
|
||||
65303637396332613432663636326334646635346237396461636366356133303333306239393739
|
||||
34353966653662346230383865643231313239626533643761366162613164333132373636623237
|
||||
32356335643766646266646266633366363165373861306433316561363166363865303133633939
|
||||
34633132343438363034323638376666313061383965323566646463653163313235373364386666
|
||||
62393865373137343237306637363536383939303833663532396333313931336162333837613935
|
||||
66383266343735396337663936333162323738383264376533316536376563396333343263643931
|
||||
65646535363337373865353265306434356432353066656665366638353331366334366339613538
|
||||
32373637633564613861626538373365336362313434633137613966353861393462623862663330
|
||||
64386431373066306334383863366133333564373163386433313231363366393830343230323734
|
||||
61633962356637326538336663386330653563353763663236623539363630626363323237333237
|
||||
30656139626561313064323330373032323031343137366638303966313832646365666238326337
|
||||
63306363613361653933306234386163383837666430616663383664386563323839326232383761
|
||||
35373539626438356539393266653864353066633365383437623437356464383335383039343137
|
||||
61373539343631373932373033656233323964353666626162386537616333366562346265656238
|
||||
35396130356166303564303036383664656435626534303064653363316464616335303965376330
|
||||
61646638383138323265313631613037396561626162306661653231646230343139656135333236
|
||||
63303838316266333665636335663361656262353066666430656162323236633564313337353665
|
||||
35363565303736633564356632346632343832363934343962313030646132663566346664313632
|
||||
38393061613163356265643434626166393366366634343032626637333332316361663639623534
|
||||
62323239373639393337373537646232663531653835356165313264663561623633633830373734
|
||||
31336234613633666538373961626430316530346462343061323661353564323938353338373961
|
||||
64616637303734303333626166306330613238646265636136653939363936356165356232396436
|
||||
65353731633836363433616534636330663565643561363233396538386430393964353433616437
|
||||
36343936313936303165396236393463646363383338366238363961666530623335653234656139
|
||||
65346337663437623134376137326166323933613861663032623965643538343638376234316232
|
||||
36333065323234663263343630353739313661373536316162366532336438373263303730626464
|
||||
38613136393166626663636631363064303736666235333036616435373063363762666565363136
|
||||
38333966303831313333613831313132633062616235353365313533386236613338373130303836
|
||||
61326262313833306437366364316433393931353265326131653563656131333436376338613266
|
||||
39326632613366666136643137303635336631353230396435313537656366326239626362313833
|
||||
62653039343261613265306362323234623264366664306561663839306631663465303962386462
|
||||
39353934643562383762623937643034383534393962333466613636346637323235346438666636
|
||||
31613838313535666166663063373333653439313035346266666463623666613837313933623837
|
||||
63343565663739393764353761316432626237346234663032316131306262356233333439323961
|
||||
38646664383030303832646563393836643135303731306435383338623633626638306165386637
|
||||
65393238653464623032336437643838333932366131656332333165376261383539386466343139
|
||||
65613733383837323832303738363664653138613830376333363038383839623463623631666237
|
||||
63363263396533353763373934373034643763376665316638353435663635346135333265363235
|
||||
62663432343935343964626432353563313036303761393039386231343530663737633466643035
|
||||
65343835353037643539316439666666633866356530363237373230373439373133313337653237
|
||||
66613631373637313534353862653437393234363365323032393035376438616264336661616262
|
||||
37336435326135373065353564383637626637343532396331623334643139386364316431376435
|
||||
36356566363033636539363430356565373039363863396565643730656531346364626334393436
|
||||
33343839303538383530363231366166623233333730323163323432373831313639626337346230
|
||||
30333930333064393337616564386163623436613933623466353933393733346339383534633239
|
||||
30633365313364666566643533326163336330323232353533316633313739343035383465376330
|
||||
65356139386463633565366132383832643032333234633964373437633836343435393631396166
|
||||
34633439643764623936366536353931646132373539326238303761383339643661616266646130
|
||||
30393166393465326365393130636136336433623262346435353936306133616135653734383635
|
||||
65393530633836613937346430366337626365363361663533313837363063396538663766646566
|
||||
63373639653732353135343562353266316164303863336365303635653464393232613939396131
|
||||
30636361343932663233663566656131363938656161623966316366656561343166336532613666
|
||||
65613534663762353662353262623634616264373964316336626166353330303539356130646166
|
||||
63643435353765633766626165643465386331333637366562393861613834323464363932306430
|
||||
32643836646266643031396262626136313363623663366430376432373036643835653863323631
|
||||
30613164326430633664306630333632363931656135643465363439376263386561383534633666
|
||||
64323763656466343064396639313264386239356664663461333166626332326536623132333434
|
||||
62303261643164643330333662623935383037353338306135613737306563326336336162633138
|
||||
33623066373265663362303133363032343933306336396466383034636131333837313333326531
|
||||
39336163313633623639303462313763656632633030336236643030343262653366633939643536
|
||||
31636535393864663363353930363761623264343630396336396431663330323436613462633136
|
||||
37336464353730643566393432343762333336653932333366636265343663323462626232623635
|
||||
34346136333630363539633666316561376266373032373961313437653564636537656630303261
|
||||
37313639333233333365383763333061373730623939303530303832646365323739356564626137
|
||||
35633366393636376463393961333830343232363266633931613332643134643234303733373466
|
||||
35323831623931633436626636346431303965663639666566623433383736633834626330303265
|
||||
37353337656233663938663839373931623137666662623266336537383631626631306235363064
|
||||
33313564316438633139336261623736336336326239376630316335313631376132646563333430
|
||||
33656432643130643832343065353834633366363339353964623762666564633835633636313731
|
||||
63353637636165663136623736343234393038313235333363643237643566623766393838386635
|
||||
33646233623032653233336266636335666233353032303837663162303939383262373761623261
|
||||
35366661363966346233633739663635353361303264356534366235616164316138623730623632
|
||||
62316362623736396264366632373661373835393434343364353431316362666235616635633566
|
||||
64353530633334393737346663653562346335323065356665643132353738363132623031353664
|
||||
66666639326238386634363664356664343161386435323736316636343536326435303066353035
|
||||
37363731613138393333636562386363333932386362303139643262386237353863363764643139
|
||||
64616561373239346464623165616332623434303433626638376232333733646136376431626438
|
||||
66613134343639656331626630303030366133356636663735353466353834613430356265386162
|
||||
66613332663232623438636661306332613162666561353537313336643134663664306630636639
|
||||
61613363353264373831393962333631383236666130646333336431303735333165656438363432
|
||||
38396530333631636135653534393531326434306362396237366430383166323832336434376364
|
||||
38393431646338316232373431613930326532646333386435303034356564336665346133393866
|
||||
61643533643361646265313334633463616437393437653935613261366635616430313064346532
|
||||
32363831613565313836376338646466323130373032613863323037323566643164653132633735
|
||||
65636562653535626461396666643330386333663137613333643165656336633038323036373162
|
||||
31376338613862333334643561313332326237646565633934323032626662633631633033623063
|
||||
63306664656437663732323339383735306132616531373865323835633264333639336163366466
|
||||
33373433653839393638323034623835643531393266306331313563613265616633353763653438
|
||||
65363532653163303861383531356639316331343531666666636336373634636134633331366364
|
||||
62366230366435323435613964636533353236373935626632623536396664313264653031623062
|
||||
33366166343630313839366262313234346262343336386538336335393835646138666330656361
|
||||
61313936323838653832633130346539636363613838343363663431623063333933383466353938
|
||||
65383361333561383631643938613862343236346233363466333237316339616362366565306639
|
||||
39356563656132303463346138356435303038303165363935343266396462326365363262393336
|
||||
37396235366639623761366239386165613065626431633733306234343866663266633631656237
|
||||
63643430383433393835663635356265636635363137613064353066313338346436356632346265
|
||||
38393730336465396263373137383238653337396364643061303234666266663064663265383434
|
||||
36636138643432373633313038393737663735363838396164366234643533633762383062353831
|
||||
66326231363337323666386263373438656630346336663239643030386434636264666634393631
|
||||
39313364333761343532346165396365306463393037643935666363323630326664616638313338
|
||||
39396336653738353333343835363861643166376565346463303135376439336134666235623230
|
||||
32363031303732666133386164313437366164326539373564623236356432303132633436323563
|
||||
36323634373538376133613736633133356638323861636434646465643432636366376138636232
|
||||
63633830613462613831313938326339343632393038376639623131366364623536353338363439
|
||||
32613331623863336165636364616634303264356630303665383638663737343836663831363263
|
||||
63366562393734323030306436346534626530656465396535323835316139633562363830373437
|
||||
63626530326530383538623165356532303862353763326432373966626436303465373431373762
|
||||
38613539623164353732623636376630643465343839666531306438326633343362306665366132
|
||||
39396537366266353864656232616334336130333337306463313932393832653661343036396261
|
||||
64613461633433356334623631643861303133383963336635623138326139613564343838366565
|
||||
36343130353462333162313736636139306233366466626231306561626335396262663531333839
|
||||
61336437343137356335633764373730306466326133356331333530353537616661373062656438
|
||||
35356235666464656466323937353837623535643937383866666133383633396563333338633034
|
||||
38366531613164363966323137646237393135383164643230663331306335636432656565633636
|
||||
34343031633632346533353666353034666266666561346464306665386634313263323333653330
|
||||
66323033393531343633356466613837346164393332613037636465343230623731616361336338
|
||||
61373332373636646435353734386366613334323161626437396232613534613330613532323534
|
||||
65653065386432313733663165616333663666363733623162306536303833663136353334656466
|
||||
64353931363838613761663561666639373865393438396565626661343934353662363834636535
|
||||
65363664393433313036383438643864663339626331343230343337316437336634636363303563
|
||||
35373539383535353235633730386232363539616632336566376264393832383637663330613133
|
||||
37643261363966633138373935333438393536373938383265373261363232343030373539366335
|
||||
61633162663137643061363366653135323639363838626266386262666133306461333432313738
|
||||
30313332626166303630363839396663396564633961383863326663356230343938643833303933
|
||||
34333032353935323565346633363537656639613663356130383264373739636231363364613066
|
||||
36653664346434393933383337313630623131396461343930383537633536643365306564396665
|
||||
31353861643335353538623838393335326364393738376239623431306231363739656438626265
|
||||
37666532336661306262303761616238666239623265663231386165353437366631376234343035
|
||||
33393037316563373534373765616238616639303031346430623561663430393536303163613338
|
||||
65353062336164626335376235656235343637366438353334356436653266333062663838316263
|
||||
32623732306462356162623437393035626433336631643833626463656634366332613936346465
|
||||
34653331363133373635633330363564333264623566613432383439396537343963653239336265
|
||||
33326132663434363065646265646130333935303662623037363938313464366564323734333437
|
||||
36336335303738643634653164306332636130316161393335656536386131396662616366383139
|
||||
36663863343736666665363337663537326330323437346565346465326231366563643136366365
|
||||
37636361343961326261336437616266373962643765346438333766306537303137353764396330
|
||||
39626635373631353635313935363834363730386132376363663462653330623130663266373432
|
||||
65343237326535613535386363396236336536366165306463643162346638623638373433646163
|
||||
62613935363636353639623839396231393838303135346536383037353636613563323234626131
|
||||
64373666303436393861373164376564646235366131343433623733663832653039393738343537
|
||||
65323534343464613230346532623966616462353532373064623566626563336464326336393364
|
||||
39626237646431313135323036303065343138616632343237396136366332636132303037376132
|
||||
33623031623635653162616265316366663262373666636638386130643336383130643232643662
|
||||
34326663343562613962343033396332303261636230353331313730336630633461333736626333
|
||||
66636430643330383032646634396133626339623036333963396662313234623466366634636334
|
||||
33373762386662613966353664346239666133656435353365653536356331613632666132376264
|
||||
62613433366633663065306166396166633836306139376533396165393966323465303638373563
|
||||
63326330323161303065643365343363313338326238363137663139613463613434643834613662
|
||||
64663365633965653363633165653038333335333232633434323037643936646561376431626230
|
||||
66356138373136366134373533386634373061666330663364376336383433306331386162393633
|
||||
33636330643531396464313736363061303466393861613730323563626363643731333633366532
|
||||
64646130636234653566346533323962353332653335336239353630633535623935396638663366
|
||||
37383661343636613261623833653032373764653164346634663431653664636233323734666166
|
||||
36373664306566663930353338366431623563396166356638626166333165623263636336613138
|
||||
34343936393964666564306637346561393538383137663162663630336462656663316338376236
|
||||
63633666333263663734353861633164653132663334306664643133663736663766626639393236
|
||||
32653430333163313363343731666135656662363838366132383732346130313130363365656263
|
||||
32643533393163376264653632663262353966306630333064313932616262323134326361633764
|
||||
63383837303936616434616630653833653833623263623532306363373836323431393335623530
|
||||
34316562343035326265333164643163356230643639373431326431303538346363376332373434
|
||||
31313666313663343363353130306561646136393732663164393232636330663635346434343134
|
||||
33663138663336636430373763396435323138373633666438623234363631336232366635366532
|
||||
62616239663934653462656163326134303261376635323864633435383666363065656665303538
|
||||
62626538343638366236646136363232373437336630383739656438636465326531646664366462
|
||||
36353663626634386538336239623734323234393463313034303837363164363263623065613061
|
||||
38333162646232366339333662313965663336613238386530393162346266636532353433656136
|
||||
66326436323836376432313238613165373565643233333435393361636637653361616435393438
|
||||
32383763393561343734643438346635613663393736613839623263663866336165343235663933
|
||||
66623137616561313462653631613830363666653635336534643935373739353138363934656134
|
||||
35663063396162623432373534333463376231666466393963336231653939326663396336383735
|
||||
34633763336163313432616163313638623963306666643432306661393632346339373963633265
|
||||
32303862643661376433356661383335313365306534663534396638313531373538326236636363
|
||||
37626138333437393363323261336663653163643565303063313231346131376261653763356631
|
||||
62306262336337366134626632333663363139393131306666303235303761623665356431646234
|
||||
33666461663035303066353137623762653565353533613435663839396238336337333463636465
|
||||
38353135356634626137376232613330393235383432356436393030313564306537616363383136
|
||||
66356463373138313661373565326565343066643133633630313031303132313031663739316631
|
||||
66666631386163313034306532393862393930653931363235396662366262636466363464396466
|
||||
61303962303066633764393831396632626233343633313061323838623134373036393164633139
|
||||
30303861636335636131376334376239636235653233323435623262366132663934613661333135
|
||||
61386136326435363337316363666330363431613135663661303438383664663930656564373730
|
||||
32373731393666333364633835646431646662313232383136616238303264383438663766356462
|
||||
32346664376430663934626661663039656461383738626265346162393861346163656161323333
|
||||
39323666643031376530303230626166613233383731363766373634623430633635303963313466
|
||||
34646331363539636133373134353535356265393265393635323532323134643034343663636362
|
||||
38633261613433393634396234396265623063346138363133646532366638306632396464646432
|
||||
61373961383438386535336131393633303430346162613738343839653038303035303033626535
|
||||
37343030623530333332306265373539633735616634663666356437303862636338363866613861
|
||||
38346130336338373865343866306665616530313938616366346131376262346135323537663137
|
||||
39383366313766666234323234363937623264353532323033363966313135653163343036666262
|
||||
34393832613034383239393930383063336131356364303231323966303633333331633666373764
|
||||
65383137333965663234663933303231356165376233326233303035316536666563656363343933
|
||||
36633039666432643135636331353932633164633964623661373739633665313433306561303637
|
||||
62373534346562363132643063643732343462653838393635343266626535353864656437313434
|
||||
34376538303965616539626534613431623834376337643936613137323031323139393762636463
|
||||
66346664666361623636666533663037613434353135393862376633636233656330366136646434
|
||||
30653735323961383130393763333630306131376430363436623238646632363462383739653636
|
||||
37346566663039383866323639633565366338353438386461616239313639343766333661346435
|
||||
33316538366463383733346663316564656566656165396465393461363061613239666165346661
|
||||
62346639623163363762366431313831663135643062336363323336303737393437653863303665
|
||||
36643466336566336236353166333063633830646461626262333937316162353365353130353535
|
||||
30383164363532363532306364393236303537383139643431393962333063633162313033613561
|
||||
32323434336364343061386666616639336566373461633462393130336461303531353436623065
|
||||
65663430623066336533373662306566396263376562343936666166626666323964373334613835
|
||||
64633535303365643564626562643562636363363834353865353765356665643965663861366436
|
||||
63333736613232353130616466316637613966646139323565356537666331666564623832333439
|
||||
36376131663431616430616265323039646432393166613631313762613264313765323231663961
|
||||
65616636306362386534626130636261636566626365643630616135323634343935653033653433
|
||||
3061
|
||||
|
|
5
group_vars/bdd.yml
Normal file
5
group_vars/bdd.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
borg_keep_hourly: 6
|
||||
borg_backup_exclude:
|
||||
- "/var/lib/postgresql/"
|
||||
...
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
loc_nginx:
|
||||
servers: []
|
||||
|
||||
|
|
3
group_vars/routeur.yml
Normal file
3
group_vars/routeur.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
rsyslog_high_density: true
|
||||
...
|
12
host_vars/caradoc.adm.auro.re.yml
Normal file
12
host_vars/caradoc.adm.auro.re.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
borg_keep_hourly: 6
|
||||
borg_keep_daily: 7
|
||||
borg_keep_weekly: 4
|
||||
borg_keep_monthly: 12
|
||||
borg_backup_directories:
|
||||
- "/etc"
|
||||
- "/var"
|
||||
- "/data_nextcloud"
|
||||
- "/data_gitea"
|
||||
- "/data_mail"
|
||||
...
|
16
host_vars/log.adm.auro.re.yml
Normal file
16
host_vars/log.adm.auro.re.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
borg_backup_directories:
|
||||
- "/etc/"
|
||||
- "/var/"
|
||||
borg_backup_exclude: []
|
||||
|
||||
rsyslog_collector_base_dir: /var/log/remote
|
||||
rsyslog_inputs:
|
||||
- proto: relp
|
||||
port: 20514
|
||||
- proto: udp
|
||||
port: 514
|
||||
- proto: tcp
|
||||
port: 6514
|
||||
rsyslog_outputs: []
|
||||
...
|
3
host_vars/perceval.adm.auro.re.yml
Normal file
3
host_vars/perceval.adm.auro.re.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
borg_server_backups_dir: /borg
|
||||
...
|
|
@ -13,6 +13,8 @@ loc_reverseproxy:
|
|||
to: auro.re
|
||||
- from: 92.222.211.195
|
||||
to: auro.re
|
||||
- from: codimd.auro.re
|
||||
to: hedgedoc.auro.re
|
||||
|
||||
reverseproxy_sites:
|
||||
- from: phabricator.auro.re
|
||||
|
@ -27,6 +29,9 @@ loc_reverseproxy:
|
|||
- from: passbolt.auro.re
|
||||
to: 10.128.0.53
|
||||
|
||||
- from: auth.auro.re
|
||||
to: 10.128.0.150:8089
|
||||
|
||||
- from: riot.auro.re
|
||||
to: "10.128.0.150:8080"
|
||||
- from: element.auro.re
|
||||
|
@ -34,8 +39,6 @@ loc_reverseproxy:
|
|||
- from: chat.auro.re
|
||||
to: "10.128.0.150:8080"
|
||||
|
||||
- from: codimd.auro.re
|
||||
to: "10.128.0.150:8081"
|
||||
- from: hedgedoc.auro.re
|
||||
to: "10.128.0.150:8081"
|
||||
|
||||
|
@ -56,5 +59,10 @@ loc_reverseproxy:
|
|||
|
||||
- from: cas.auro.re
|
||||
to: "10.128.0.150:8085"
|
||||
- from: rss.auro.re
|
||||
to: 10.128.0.150:8090
|
||||
- from: status.auro.re
|
||||
to: "10.128.0.150:8086"
|
||||
- from: "kanboard.auro.re"
|
||||
to: "10.128.0.150:8088"
|
||||
...
|
||||
|
|
|
@ -41,9 +41,6 @@ loc_reverseproxy:
|
|||
- from: intranet.auro.re
|
||||
to: 10.128.0.20
|
||||
|
||||
- from: bbb.auro.re
|
||||
to: 10.128.0.54
|
||||
|
||||
- from: nextcloud.auro.re
|
||||
to: "10.128.0.58:8080"
|
||||
|
||||
|
@ -64,3 +61,12 @@ loc_reverseproxy:
|
|||
|
||||
- from: wikijs.auro.re
|
||||
to: "10.128.0.66:3000"
|
||||
|
||||
- from: wiki.auro.re
|
||||
to: "10.128.0.66:3000"
|
||||
|
||||
- from: netbox.auro.re
|
||||
to: 10.128.0.97
|
||||
|
||||
- from: grafana.auro.re
|
||||
to: "10.128.0.98:3000"
|
||||
|
|
373
hosts
373
hosts
|
@ -8,10 +8,11 @@
|
|||
###############################################################################
|
||||
# Aurore : main services
|
||||
|
||||
viviane.adm.auro.re
|
||||
|
||||
[aurore_pve]
|
||||
merlin.adm.auro.re
|
||||
escalope.adm.auro.re
|
||||
services-1.pve.auro.re
|
||||
services-2.pve.auro.re
|
||||
services-3.pve.auro.re
|
||||
|
||||
[aurore_vm]
|
||||
routeur-aurore.adm.auro.re
|
||||
|
@ -25,21 +26,30 @@ camelot.adm.auro.re
|
|||
gitea.adm.auro.re
|
||||
drone.adm.auro.re
|
||||
nextcloud.adm.auro.re
|
||||
stream.adm.auro.re
|
||||
galene.adm.auro.re
|
||||
re2o-server.adm.auro.re
|
||||
re2o-ldap.adm.auro.re
|
||||
re2o-db.adm.auro.re
|
||||
services-bdd-local.adm.auro.re
|
||||
backup.adm.auro.re
|
||||
services-web.adm.auro.re
|
||||
mail.adm.auro.re
|
||||
wikijs.adm.auro.re
|
||||
prometheus-aurore.adm.auro.re
|
||||
portail.adm.auro.re
|
||||
jitsi-aurore.adm.auro.re
|
||||
log.adm.auro.re
|
||||
bdd.adm.auro.re
|
||||
bdd-ovh.adm.auro.re
|
||||
litl.adm.auro.re
|
||||
log.adm.auro.re
|
||||
netbox.adm.auro.re
|
||||
grafana.adm.auro.re
|
||||
dolibarr.adm.auro.re
|
||||
infra-1.router.auro.re ansible_host=10.129.0.245
|
||||
infra-2.router.auro.re ansible_host=10.129.0.246
|
||||
|
||||
[aurore_testing_vm]
|
||||
pendragon.adm.auro.re
|
||||
|
||||
[aurore_ilo]
|
||||
escalope-ilo.adm.auro.re
|
||||
|
||||
###############################################################################
|
||||
# OVH
|
||||
|
@ -49,17 +59,11 @@ horus.adm.auro.re
|
|||
|
||||
[ovh_container]
|
||||
synapse.adm.auro.re
|
||||
services-bdd.adm.auro.re
|
||||
phabricator.adm.auro.re
|
||||
wiki.adm.auro.re
|
||||
www.adm.auro.re
|
||||
proxy-ovh.adm.auro.re
|
||||
matrix-services.adm.auro.re
|
||||
|
||||
[ovh_vm]
|
||||
serge.adm.auro.re
|
||||
passbolt.adm.auro.re
|
||||
vpn-ovh.adm.auro.re
|
||||
docker-ovh.adm.auro.re
|
||||
switchs-manager.adm.auro.re
|
||||
ldap-replica-ovh.adm.auro.re
|
||||
|
@ -73,8 +77,10 @@ prometheus-federate.adm.auro.re
|
|||
###############################################################################
|
||||
# Les Jardins de Fleming
|
||||
|
||||
[fleming_server]
|
||||
perceval.adm.auro.re
|
||||
|
||||
[fleming_pve]
|
||||
freya.adm.auro.re
|
||||
marki.adm.auro.re
|
||||
|
||||
[fleming_vm]
|
||||
|
@ -83,37 +89,30 @@ dhcp-fleming.adm.auro.re
|
|||
dhcp-fleming-backup.adm.auro.re
|
||||
dns-fleming.adm.auro.re
|
||||
dns-fleming-backup.adm.auro.re
|
||||
ntp-1.int.infra.auro.re
|
||||
prometheus-fleming.adm.auro.re
|
||||
#prometheus-fleming-fo.adm.auro.re
|
||||
radius-fleming.adm.auro.re
|
||||
dns-1.int.infra.auro.re
|
||||
isp-1.rtr.infra.auro.re
|
||||
isp-2.rtr.infra.auro.re
|
||||
dhcp-1.isp.auro.re
|
||||
dhcp-2.isp.auro.re
|
||||
radius-fleming-backup.adm.auro.re
|
||||
unifi-fleming.adm.auro.re
|
||||
routeur-fleming.adm.auro.re
|
||||
routeur-fleming-backup.adm.auro.re
|
||||
|
||||
[fleming_ilo]
|
||||
marki-ilo.adm.auro.re
|
||||
|
||||
[fleming_unifi]
|
||||
ff-1-2.borne.auro.re
|
||||
fe-1-2.borne.auro.re
|
||||
ff-2-2.borne.auro.re
|
||||
ff-3-2.borne.auro.re
|
||||
ff-4-2.borne.auro.re
|
||||
fh-1-2.borne.auro.re
|
||||
fh-2-2.borne.auro.re
|
||||
fe-3-2.borne.auro.re
|
||||
fe-2-2.borne.auro.re
|
||||
fe-4-2.borne.auro.re
|
||||
fh-3-2.borne.auro.re
|
||||
fh-4-2.borne.auro.re
|
||||
fg-3-2.borne.auro.re
|
||||
fg-2-2.borne.auro.re
|
||||
fi-1-2.borne.auro.re
|
||||
fi-2-2.borne.auro.re
|
||||
fi-3-2.borne.auro.re
|
||||
fi-4-2.borne.auro.re
|
||||
fa-0-1.borne.auro.re
|
||||
fa-1-1.borne.auro.re
|
||||
fa-2-1.borne.auro.re
|
||||
fa-3-1.borne.auro.re
|
||||
fa-4-1.borne.auro.re
|
||||
fa-j-1.borne.auro.re
|
||||
fb-0-1.borne.auro.re
|
||||
fb-1-1.borne.auro.re
|
||||
fb-2-1.borne.auro.re
|
||||
|
@ -124,67 +123,83 @@ fc-1-1.borne.auro.re
|
|||
fc-2-1.borne.auro.re
|
||||
fc-3-1.borne.auro.re
|
||||
fc-4-1.borne.auro.re
|
||||
fd-2-1.borne.auro.re
|
||||
fd-0-1.borne.auro.re
|
||||
fd-1-1.borne.auro.re
|
||||
fa-0-1.borne.auro.re
|
||||
fd-2-1.borne.auro.re
|
||||
fd-3-1.borne.auro.re
|
||||
fe-0-1.borne.auro.re
|
||||
fe-1-1.borne.auro.re
|
||||
fe-1-2.borne.auro.re
|
||||
fe-2-1.borne.auro.re
|
||||
fe-2-2.borne.auro.re
|
||||
fe-3-1.borne.auro.re
|
||||
fe-3-2.borne.auro.re
|
||||
fe-4-1.borne.auro.re
|
||||
fe-4-2.borne.auro.re
|
||||
ff-0-1.borne.auro.re
|
||||
ff-0-f.borne.auro.re
|
||||
ff-1-1.borne.auro.re
|
||||
ff-1-2.borne.auro.re
|
||||
ff-2-1.borne.auro.re
|
||||
ff-2-2.borne.auro.re
|
||||
ff-3-1.borne.auro.re
|
||||
ff-3-2.borne.auro.re
|
||||
ff-4-1.borne.auro.re
|
||||
ff-4-2.borne.auro.re
|
||||
fg-0-1.borne.auro.re
|
||||
fg-1-1.borne.auro.re
|
||||
fg-1-2.borne.auro.re
|
||||
fg-2-1.borne.auro.re
|
||||
fg-2-2.borne.auro.re
|
||||
fg-3-1.borne.auro.re
|
||||
fg-3-2.borne.auro.re
|
||||
fg-4-1.borne.auro.re
|
||||
fh-0-1.borne.auro.re
|
||||
fh-1-1.borne.auro.re
|
||||
fh-1-2.borne.auro.re
|
||||
fh-2-1.borne.auro.re
|
||||
fh-2-2.borne.auro.re
|
||||
fh-3-1.borne.auro.re
|
||||
fe-2-1.borne.auro.re
|
||||
fh-3-2.borne.auro.re
|
||||
fh-4-1.borne.auro.re
|
||||
fh-4-2.borne.auro.re
|
||||
fi-0-1.borne.auro.re
|
||||
fi-0-2.borne.auro.re
|
||||
fi-1-1.borne.auro.re
|
||||
fi-1-2.borne.auro.re
|
||||
fi-2-1.borne.auro.re
|
||||
fi-2-2.borne.auro.re
|
||||
fi-3-1.borne.auro.re
|
||||
fi-3-2.borne.auro.re
|
||||
fi-4-1.borne.auro.re
|
||||
fi-4-2.borne.auro.re
|
||||
fj-0-1.borne.auro.re
|
||||
fj-1-1.borne.auro.re
|
||||
fj-1-2.borne.auro.re
|
||||
fj-2-1.borne.auro.re
|
||||
fj-2-2.borne.auro.re
|
||||
fj-3-1.borne.auro.re
|
||||
fj-3-2.borne.auro.re
|
||||
fj-4-1.borne.auro.re
|
||||
fj-4-2.borne.auro.re
|
||||
fk-0-1.borne.auro.re
|
||||
fk-1-1.borne.auro.re
|
||||
fk-1-2.borne.auro.re
|
||||
fk-2-1.borne.auro.re
|
||||
fk-2-2.borne.auro.re
|
||||
fk-3-1.borne.auro.re
|
||||
fk-3-2.borne.auro.re
|
||||
fk-4-1.borne.auro.re
|
||||
fk-4-2.borne.auro.re
|
||||
fl-0-1.borne.auro.re
|
||||
fl-1-1.borne.auro.re
|
||||
fl-2-1.borne.auro.re
|
||||
fl-3-1.borne.auro.re
|
||||
fl-4-1.borne.auro.re
|
||||
fe-1-1.borne.auro.re
|
||||
ff-0-f.borne.auro.re
|
||||
fj-4-2.borne.auro.re
|
||||
fj-3-2.borne.auro.re
|
||||
fj-2-2.borne.auro.re
|
||||
fj-1-2.borne.auro.re
|
||||
fk-4-2.borne.auro.re
|
||||
fk-3-2.borne.auro.re
|
||||
fk-2-2.borne.auro.re
|
||||
fk-1-2.borne.auro.re
|
||||
fl-4-2.borne.auro.re
|
||||
fl-3-2.borne.auro.re
|
||||
fl-2-2.borne.auro.re
|
||||
fl-1-2.borne.auro.re
|
||||
fa-j-1.borne.auro.re
|
||||
fg-1-2.borne.auro.re
|
||||
fi-0-2.borne.auro.re
|
||||
fl-2-1.borne.auro.re
|
||||
fl-2-2.borne.auro.re
|
||||
fl-3-1.borne.auro.re
|
||||
fl-3-2.borne.auro.re
|
||||
fl-4-1.borne.auro.re
|
||||
fl-4-2.borne.auro.re
|
||||
|
||||
###############################################################################
|
||||
# Pacaterie
|
||||
|
@ -207,48 +222,51 @@ unifi-pacaterie.adm.auro.re
|
|||
routeur-pacaterie.adm.auro.re
|
||||
routeur-pacaterie-backup.adm.auro.re
|
||||
|
||||
[pacaterie_ilo]
|
||||
mordred-ilo.adm.auro.re
|
||||
titan-ilo.adm.auro.re
|
||||
|
||||
[pacaterie_unifi]
|
||||
pn-1-1.borne.auro.re
|
||||
pc-1-1.borne.auro.re
|
||||
pn-0-1.borne.auro.re
|
||||
pn-0-2.borne.auro.re
|
||||
pn-0-3.borne.auro.re
|
||||
pn-1-1.borne.auro.re
|
||||
pn-1-2.borne.auro.re
|
||||
pn-1-3.borne.auro.re
|
||||
pn-3-1.borne.auro.re
|
||||
pn-2-1.borne.auro.re
|
||||
pn-2-2.borne.auro.re
|
||||
pn-2-3.borne.auro.re
|
||||
pn-3-3.borne.auro.re
|
||||
pn-4-3.borne.auro.re
|
||||
pn-2-1.borne.auro.re
|
||||
pn-3-1.borne.auro.re
|
||||
pn-3-2.borne.auro.re
|
||||
pn-0-1.borne.auro.re
|
||||
pn-1-2.borne.auro.re
|
||||
pc-1-1.borne.auro.re
|
||||
pn-4-2.borne.auro.re
|
||||
pn-3-3.borne.auro.re
|
||||
pn-4-1.borne.auro.re
|
||||
ps-0-3.borne.auro.re
|
||||
pn-4-2.borne.auro.re
|
||||
pn-4-3.borne.auro.re
|
||||
ps-0-1.borne.auro.re
|
||||
ps-1-3.borne.auro.re
|
||||
ps-2-3.borne.auro.re
|
||||
ps-1-2.borne.auro.re
|
||||
ps-3-2.borne.auro.re
|
||||
ps-4-1.borne.auro.re
|
||||
ps-2-1.borne.auro.re
|
||||
ps-3-1.borne.auro.re
|
||||
ps-4-3.borne.auro.re
|
||||
ps-2-2.borne.auro.re
|
||||
ps-1-1.borne.auro.re
|
||||
ps-4-2.borne.auro.re
|
||||
ps-0-2.borne.auro.re
|
||||
ps-0-3.borne.auro.re
|
||||
ps-1-1.borne.auro.re
|
||||
ps-1-2.borne.auro.re
|
||||
ps-1-3.borne.auro.re
|
||||
ps-2-1.borne.auro.re
|
||||
ps-2-2.borne.auro.re
|
||||
ps-2-3.borne.auro.re
|
||||
ps-3-1.borne.auro.re
|
||||
ps-3-2.borne.auro.re
|
||||
ps-3-3.borne.auro.re
|
||||
ps-4-1.borne.auro.re
|
||||
ps-4-2.borne.auro.re
|
||||
ps-4-3.borne.auro.re
|
||||
|
||||
###############################################################################
|
||||
# Emilie du Chatelet
|
||||
|
||||
[edc_server]
|
||||
perceval.adm.auro.re
|
||||
caradoc.adm.auro.re
|
||||
|
||||
[edc_pve]
|
||||
chapalux.adm.auro.re
|
||||
escalope.adm.auro.re
|
||||
|
||||
[edc_vm]
|
||||
routeur-edc.adm.auro.re
|
||||
|
@ -263,13 +281,20 @@ radius-edc-backup.adm.auro.re
|
|||
ldap-replica-edc.adm.auro.re
|
||||
prometheus-edc.adm.auro.re
|
||||
|
||||
[edc_ilo]
|
||||
caradoc-ilo.adm.auro.re
|
||||
chapalux-ilo.adm.auro.re
|
||||
|
||||
[edc_unifi]
|
||||
ep-1-1.borne.auro.re
|
||||
ep-1-3.borne.auro.re
|
||||
ep-1-2.borne.auro.re
|
||||
ep-0-1.borne.auro.re
|
||||
eo-2-1.borne.auro.re
|
||||
ee-2-1.borne.auro.re
|
||||
ee-2-2.borne.auro.re
|
||||
eo-0-1.borne.auro.re
|
||||
eo-2-1.borne.auro.re
|
||||
ep-0-1.borne.auro.re
|
||||
ep-1-1.borne.auro.re
|
||||
ep-1-2.borne.auro.re
|
||||
ep-1-3.borne.auro.re
|
||||
|
||||
|
||||
###############################################################################
|
||||
# George Sand
|
||||
|
@ -291,59 +316,64 @@ radius-gs-backup.adm.auro.re
|
|||
prometheus-gs.adm.auro.re
|
||||
ldap-replica-gs.adm.auro.re
|
||||
|
||||
[gs_ilo]
|
||||
lancelot-ilo.adm.auro.re
|
||||
odin-ilo.adm.auro.re
|
||||
|
||||
[gs_unifi]
|
||||
ga-1-2.borne.auro.re
|
||||
ge-3-2.borne.auro.re
|
||||
gb-4-2.borne.auro.re
|
||||
gg-5-2.borne.auro.re
|
||||
gd-5-2.borne.auro.re
|
||||
gc-5-2.borne.auro.re
|
||||
gc-3-1.borne.auro.re
|
||||
gc-4-1.borne.auro.re
|
||||
gg-5-1.borne.auro.re
|
||||
ge-1-2.borne.auro.re
|
||||
gh-1-2.borne.auro.re
|
||||
gd-1-2.borne.auro.re
|
||||
gf-3-2.borne.auro.re
|
||||
gd-4-2.borne.auro.re
|
||||
ga-0-1.borne.auro.re
|
||||
ga-1-1.borne.auro.re
|
||||
ga-1-2.borne.auro.re
|
||||
ga-2-1.borne.auro.re
|
||||
ga-2-2.borne.auro.re
|
||||
ga-3-1.borne.auro.re
|
||||
ga-4-1.borne.auro.re
|
||||
ga-5-1.borne.auro.re
|
||||
ga-5-2.borne.auro.re
|
||||
gb-1-1.borne.auro.re
|
||||
gc-1-1.borne.auro.re
|
||||
gc-2-1.borne.auro.re
|
||||
gc-5-1.borne.auro.re
|
||||
gb-2-1.borne.auro.re
|
||||
gb-3-1.borne.auro.re
|
||||
gb-4-1.borne.auro.re
|
||||
gb-4-2.borne.auro.re
|
||||
gb-5-1.borne.auro.re
|
||||
gc-1-1.borne.auro.re
|
||||
gc-2-1.borne.auro.re
|
||||
gc-3-1.borne.auro.re
|
||||
gc-4-1.borne.auro.re
|
||||
gc-5-1.borne.auro.re
|
||||
gc-5-2.borne.auro.re
|
||||
gd-1-1.borne.auro.re
|
||||
gd-1-2.borne.auro.re
|
||||
gd-2-1.borne.auro.re
|
||||
gd-3-1.borne.auro.re
|
||||
gd-4-1.borne.auro.re
|
||||
gd-4-2.borne.auro.re
|
||||
gd-5-1.borne.auro.re
|
||||
gd-5-2.borne.auro.re
|
||||
gd-garage-1.borne.auro.re
|
||||
ge-0-1.borne.auro.re
|
||||
ge-1-1.borne.auro.re
|
||||
ge-1-2.borne.auro.re
|
||||
ge-2-1.borne.auro.re
|
||||
ge-2-2.borne.auro.re
|
||||
ge-3-1.borne.auro.re
|
||||
ge-3-2.borne.auro.re
|
||||
ge-4-1.borne.auro.re
|
||||
ge-5-1.borne.auro.re
|
||||
gf-0-1.borne.auro.re
|
||||
gf-1-1.borne.auro.re
|
||||
gf-2-1.borne.auro.re
|
||||
gf-3-1.borne.auro.re
|
||||
gf-3-2.borne.auro.re
|
||||
gf-4-1.borne.auro.re
|
||||
gf-1-1.borne.auro.re
|
||||
gd-garage-1.borne.auro.re
|
||||
gf-5-1.borne.auro.re
|
||||
|
||||
gg-5-1.borne.auro.re
|
||||
gg-5-2.borne.auro.re
|
||||
gh-1-2.borne.auro.re
|
||||
|
||||
###############################################################################
|
||||
# Les Rives
|
||||
[rives_pve]
|
||||
thor.adm.auro.re
|
||||
loki.adm.auro.re
|
||||
|
||||
[rives_vm]
|
||||
|
@ -354,41 +384,75 @@ radius-rives-backup.adm.auro.re
|
|||
routeur-rives-backup.adm.auro.re
|
||||
ldap-replica-rives.adm.auro.re
|
||||
prometheus-rives.adm.auro.re
|
||||
dhcp-rives.adm.auro.re
|
||||
dns-rives.adm.auro.re
|
||||
radius-rives.adm.auro.re
|
||||
routeur-rives.adm.auro.re
|
||||
|
||||
[rives_ilo]
|
||||
loki-ilo.adm.auro.re
|
||||
|
||||
[rives_unifi]
|
||||
r3-4-4.borne.auro.re
|
||||
r3-4-3.borne.auro.re
|
||||
r3-2-1.borne.auro.re
|
||||
r3-4-1.borne.auro.re
|
||||
r3-2-8.borne.auro.re
|
||||
r3-3-4.borne.auro.re
|
||||
r3-1-3.borne.auro.re
|
||||
r3-3-5.borne.auro.re
|
||||
r3-2-4.borne.auro.re
|
||||
r3-3-6.borne.auro.re
|
||||
r3-1-2.borne.auro.re
|
||||
r3-4-5.borne.auro.re
|
||||
r3-2-2.borne.auro.re
|
||||
r3-4-6.borne.auro.re
|
||||
r1-1-1.borne.auro.re
|
||||
r1-1-2.borne.auro.re
|
||||
r1-1-3.borne.auro.re
|
||||
r1-1-4.borne.auro.re
|
||||
r1-1-5.borne.auro.re
|
||||
r1-1-6.borne.auro.re
|
||||
r1-2-1.borne.auro.re
|
||||
r1-2-2.borne.auro.re
|
||||
r1-2-3.borne.auro.re
|
||||
r1-2-4.borne.auro.re
|
||||
r1-3-1.borne.auro.re
|
||||
r1-3-2.borne.auro.re
|
||||
r1-3-3.borne.auro.re
|
||||
r1-3-4.borne.auro.re
|
||||
r1-3-5.borne.auro.re
|
||||
r1-3-6.borne.auro.re
|
||||
r2-1-1.borne.auro.re
|
||||
r2-1-2.borne.auro.re
|
||||
r2-1-3.borne.auro.re
|
||||
r2-1-4.borne.auro.re
|
||||
r2-2-1.borne.auro.re
|
||||
r2-2-2.borne.auro.re
|
||||
r2-2-3.borne.auro.re
|
||||
r2-3-1.borne.auro.re
|
||||
r2-3-2.borne.auro.re
|
||||
r2-3-3.borne.auro.re
|
||||
r2-3-4.borne.auro.re
|
||||
r3-0-1.borne.auro.re
|
||||
r3-0-2.borne.auro.re
|
||||
r3-0-3.borne.auro.re
|
||||
r3-0-4.borne.auro.re
|
||||
r3-1-1.borne.auro.re
|
||||
r3-4-7.borne.auro.re
|
||||
r3-4-2.borne.auro.re
|
||||
r3-4-8.borne.auro.re
|
||||
r3-2-3.borne.auro.re
|
||||
r3-1-2.borne.auro.re
|
||||
r3-1-3.borne.auro.re
|
||||
r3-1-4.borne.auro.re
|
||||
r3-1-5.borne.auro.re
|
||||
r3-1-6.borne.auro.re
|
||||
r3-1-7.borne.auro.re
|
||||
r3-2-1.borne.auro.re
|
||||
r3-2-2.borne.auro.re
|
||||
r3-2-3.borne.auro.re
|
||||
r3-2-4.borne.auro.re
|
||||
r3-2-5.borne.auro.re
|
||||
r3-2-6.borne.auro.re
|
||||
r3-2-7.borne.auro.re
|
||||
r3-3-3.borne.auro.re
|
||||
r3-0-1.borne.auro.re
|
||||
r3-3-2.borne.auro.re
|
||||
r3-0-2.borne.auro.re
|
||||
r3-2-8.borne.auro.re
|
||||
r3-3-1.borne.auro.re
|
||||
r3-0-3.borne.auro.re
|
||||
r3-1-5.borne.auro.re
|
||||
r3-0-4.borne.auro.re
|
||||
r3-1-4.borne.auro.re
|
||||
r3-3-2.borne.auro.re
|
||||
r3-3-3.borne.auro.re
|
||||
r3-3-4.borne.auro.re
|
||||
r3-3-5.borne.auro.re
|
||||
r3-3-6.borne.auro.re
|
||||
r3-4-1.borne.auro.re
|
||||
r3-4-2.borne.auro.re
|
||||
r3-4-3.borne.auro.re
|
||||
r3-4-4.borne.auro.re
|
||||
r3-4-5.borne.auro.re
|
||||
r3-4-6.borne.auro.re
|
||||
r3-4-7.borne.auro.re
|
||||
r3-4-8.borne.auro.re
|
||||
|
||||
# -aurore services
|
||||
[aurore:children]
|
||||
|
@ -403,6 +467,7 @@ ovh_vm
|
|||
|
||||
# everything at fleming
|
||||
[fleming:children]
|
||||
fleming_server
|
||||
fleming_pve
|
||||
fleming_vm
|
||||
fleming_unifi
|
||||
|
@ -415,6 +480,7 @@ pacaterie_unifi
|
|||
|
||||
# everything at edc
|
||||
[edc:children]
|
||||
edc_server
|
||||
edc_pve
|
||||
edc_vm
|
||||
edc_unifi
|
||||
|
@ -447,6 +513,11 @@ edc_vm
|
|||
gs_vm
|
||||
rives_vm
|
||||
|
||||
# every server
|
||||
[server:children]
|
||||
fleming_server
|
||||
edc_server
|
||||
|
||||
# every PVE
|
||||
[pve:children]
|
||||
ovh_pve
|
||||
|
@ -467,6 +538,20 @@ pacaterie_unifi
|
|||
###############################################################################
|
||||
# Groups by service
|
||||
|
||||
[routeur]
|
||||
routeur-fleming.adm.auro.re
|
||||
routeur-fleming-backup.adm.auro.re
|
||||
routeur-pacaterie.adm.auro.re
|
||||
routeur-pacaterie-backup.adm.auro.re
|
||||
routeur-edc.adm.auro.re
|
||||
routeur-edc-backup.adm.auro.re
|
||||
routeur-gs.adm.auro.re
|
||||
routeur-gs-backup.adm.auro.re
|
||||
routeur-rives.adm.auro.re
|
||||
routeur-rives-backup.adm.auro.re
|
||||
routeur-aurore.adm.auro.re
|
||||
routeur-aurore-backup.adm.auro.re
|
||||
|
||||
[ldap_replica:children]
|
||||
ldap_replica_fleming
|
||||
ldap_replica_pacaterie
|
||||
|
@ -508,3 +593,31 @@ reverseproxy
|
|||
[reverseproxy]
|
||||
proxy-ovh.adm.auro.re
|
||||
proxy.adm.auro.re
|
||||
|
||||
[bdd]
|
||||
bdd.adm.auro.re
|
||||
bdd-ovh.adm.auro.re
|
||||
re2o-db.adm.auro.re
|
||||
|
||||
[radius]
|
||||
radius-aurore.adm.auro.re
|
||||
radius-fleming.adm.auro.re
|
||||
radius-fleming-backup.adm.auro.re
|
||||
radius-edc.adm.auro.re
|
||||
radius-edc-backup.adm.auro.re
|
||||
radius-gs.adm.auro.re
|
||||
radius-gs-backup.adm.auro.re
|
||||
radius-pacaterie.adm.auro.re
|
||||
radius-pacaterie-backup.adm.auro.re
|
||||
radius-rives.adm.auro.re
|
||||
radius-rives-backup.adm.auro.re
|
||||
|
||||
[prometheus]
|
||||
prometheus-ovh.adm.auro.re
|
||||
prometheus-aurore.adm.auro.re
|
||||
prometheus-rives.adm.auro.re
|
||||
prometheus-gs.adm.auro.re
|
||||
prometheus-edc.adm.auro.re
|
||||
prometheus-pacaterie.adm.auro.re
|
||||
prometheus-fleming.adm.auro.re
|
||||
prometheus-federate.adm.auro.re
|
||||
|
|
132
monitoring.yml
132
monitoring.yml
|
@ -1,132 +0,0 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: prometheus-fleming.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['fleming_pve'] + groups['fleming_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets:
|
||||
- targets: "{{ groups['fleming_unifi'] | list | sort }}"
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
- hosts: prometheus-pacaterie.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['pacaterie_pve'] + groups['pacaterie_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets:
|
||||
- targets: "{{ groups['pacaterie_unifi'] | list | sort }}"
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-pn-1.ups.auro.re
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
- hosts: prometheus-edc.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-ec-1.ups.auro.re
|
||||
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['edc_pve'] + groups['edc_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets:
|
||||
- targets: "{{ groups['edc_unifi'] | list | sort }}"
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
- hosts: prometheus-gs.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['gs_pve'] + groups['gs_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets:
|
||||
- targets: "{{ groups['gs_unifi'] | list | sort }}"
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-gk-1.ups.auro.re
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
- hosts: prometheus-rives.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-r3-1.ups.auro.re
|
||||
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['rives_pve'] + groups['rives_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets:
|
||||
- targets: "{{ groups['rives_unifi'] | list | sort }}"
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
- hosts: prometheus-aurore.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['aurore_pve'] + groups['aurore_vm'] | list | sort }}
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
- hosts: prometheus-ovh.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_targets:
|
||||
- targets: |
|
||||
{{ groups['ovh_pve'] + groups['ovh_vm'] | list | sort }}
|
||||
prometheus_docker_targets:
|
||||
- docker-ovh.adm.auro.re:8087
|
||||
roles:
|
||||
- prometheus
|
||||
|
||||
|
||||
- hosts: prometheus-federate.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
|
||||
# Prometheus targets.json
|
||||
prometheus_targets:
|
||||
- prometheus-edc.adm.auro.re
|
||||
- prometheus-gs.adm.auro.re
|
||||
- prometheus-fleming.adm.auro.re
|
||||
- prometheus-pacaterie.adm.auro.re
|
||||
- prometheus-rives.adm.auro.re
|
||||
- prometheus-aurore.adm.auro.re
|
||||
- prometheus-ovh.adm.auro.re
|
||||
- prometheus-federate.adm.auro.re
|
||||
roles:
|
||||
- prometheus_federate
|
||||
|
||||
|
||||
# Monitor all hosts
|
||||
- hosts: all,!edc_unifi,!fleming_unifi,!pacaterie_unifi,!gs_unifi,!rives_unifi,!aurore_testing_vm,!ovh_container
|
||||
roles:
|
||||
- prometheus_node
|
65
network.yml
65
network.yml
|
@ -1,65 +0,0 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Set up DHCP servers.
|
||||
- hosts: dhcp-*.adm.auro.re
|
||||
roles:
|
||||
- isc_dhcp_server
|
||||
|
||||
|
||||
# Deploy unbound DNS server (recursive).
|
||||
- hosts: dns-*.adm.auro.re,!dns-aurore*.adm.auro.re
|
||||
roles:
|
||||
- unbound
|
||||
|
||||
|
||||
# Déploiement du service re2o aurore-firewall et keepalived
|
||||
# radvd: IPv6 SLAAC (/64 subnets, private IPs).
|
||||
# Must NOT be on routeur-aurore-*, or will with DHCPv6!
|
||||
- hosts: ~routeur-(pacaterie|edc|fleming|gs|rives).*\.adm\.auro\.re
|
||||
roles:
|
||||
- router
|
||||
- radvd
|
||||
|
||||
# No radvd here
|
||||
- hosts: ~routeur-aurore.*\.adm\.auro\.re
|
||||
roles:
|
||||
- router
|
||||
- ipv6_edge_router
|
||||
|
||||
# Radius (backup only for now)
|
||||
- hosts: radius-*.adm.auro.re
|
||||
roles:
|
||||
- radius
|
||||
|
||||
|
||||
# WIP: Deploy authoritative DNS servers
|
||||
# - hosts: authoritative_dns
|
||||
# vars:
|
||||
# service_repo: https://gitlab.crans.org/nounous/re2o-dns.git
|
||||
# service_name: dns
|
||||
# service_version: crans
|
||||
# service_config:
|
||||
# hostname: re2o-server.adm.auro.re
|
||||
# username: service-user
|
||||
# password: "{{ vault_serviceuser_passwd }}"
|
||||
# roles:
|
||||
# - re2o_service
|
||||
|
||||
|
||||
# Deploy Unifi Controller
|
||||
# - hosts: unifi-fleming.adm.auro.re,unifi-pacaterie.adm.auro.re
|
||||
# roles:
|
||||
# - unifi-controller
|
||||
|
||||
# Deploy Re2o switch service
|
||||
# - hosts: switchs-manager.adm.auro.re
|
||||
# vars:
|
||||
# service_repo: https://gitlab.federez.net/re2o/switchs.git
|
||||
# service_name: switchs
|
||||
# service_version: master
|
||||
# service_config:
|
||||
# hostname: re2o-server.adm.auro.re
|
||||
# username: service-user
|
||||
# password: "{{ vault_serviceuser_passwd }}"
|
||||
# roles:
|
||||
# - re2o_service
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Docker hosts
|
||||
- hosts: vm,pve # FIXME ADD MAIL SERVER TO PREVENT ACCIDENTS
|
||||
roles:
|
||||
- nullmailer
|
|
@ -5,13 +5,6 @@
|
|||
roles:
|
||||
- baseconfig
|
||||
- basesecurity
|
||||
|
||||
# Plug LDAP on all servers
|
||||
- hosts: all,!unifi
|
||||
roles:
|
||||
- ldap_client
|
||||
|
||||
# Install logrotate
|
||||
- hosts: all,!unifi,!pve
|
||||
roles:
|
||||
- logrotate
|
||||
- update_motd
|
32
playbooks/borgbackup.yml
Executable file
32
playbooks/borgbackup.yml
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: perceval.adm.auro.re
|
||||
vars:
|
||||
update_motd:
|
||||
borgbackup_server: >-
|
||||
Les sauvegardes (borg) sont stockées dans
|
||||
{{ borg_server_backups_dir }}.
|
||||
roles:
|
||||
- borgbackup_server
|
||||
- update_motd
|
||||
|
||||
- hosts: all,!unifi,!unifi-*,!bdd
|
||||
vars:
|
||||
update_motd:
|
||||
borgbackup_client: >-
|
||||
BorgBackup est déployé (/etc/borgmatic/config.yaml)
|
||||
roles:
|
||||
- borgbackup_client
|
||||
- update_motd
|
||||
|
||||
# On databases server, also backup databases
|
||||
- hosts: bdd
|
||||
vars:
|
||||
borg_postgresql_databases: true
|
||||
update_motd:
|
||||
borgbackup_client: >-
|
||||
BorgBackup est déployé (/etc/borgmatic/config.yaml)
|
||||
roles:
|
||||
- borgbackup_client
|
||||
- update_motd
|
||||
...
|
27
playbooks/chronyd.yml
Executable file
27
playbooks/chronyd.yml
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts:
|
||||
- ntp-1.int.infra.auro.re
|
||||
vars:
|
||||
chronyd__allow_networks:
|
||||
- 10.128.0.0/16
|
||||
- 2a09:6840:128::/48
|
||||
chronyd__pools:
|
||||
- 0.pool.ntp.org
|
||||
- 1.pool.ntp.org
|
||||
- 2.pool.ntp.org
|
||||
- 3.pool.ntp.org
|
||||
chronyd__local_stratum: 10
|
||||
roles:
|
||||
- chronyd
|
||||
|
||||
- hosts:
|
||||
- all
|
||||
- "!ntp-1.int.infra.auro.re"
|
||||
- "!unifi"
|
||||
vars:
|
||||
chronyd__pools:
|
||||
- ntp-1.int.infra.auro.re
|
||||
roles:
|
||||
- chronyd
|
||||
...
|
10
playbooks/docker.yml
Executable file
10
playbooks/docker.yml
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Docker hosts
|
||||
- hosts: docker-ovh.adm.auro.re,gitea.adm.auro.re,drone.adm.auro.re,wikijs.adm.auro.re
|
||||
vars:
|
||||
update_motd:
|
||||
docker: Docker est déployé.
|
||||
roles:
|
||||
- docker
|
||||
- update_motd
|
27
playbooks/grafana.yml
Executable file
27
playbooks/grafana.yml
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Grafana
|
||||
- hosts: grafana.adm.auro.re
|
||||
vars:
|
||||
grafana:
|
||||
root_url: https://grafana.auro.re
|
||||
database:
|
||||
type: postgres
|
||||
host: 10.128.0.95
|
||||
name: grafana
|
||||
user: grafana
|
||||
password: "{{ vault_postgresql_grafana_passwd }}"
|
||||
ldap:
|
||||
host: "re2o-ldap.adm.auro.re ldap-replica-ovh.adm.auro.re 10.128.0.21 10.128.0.149"
|
||||
bind_dn: cn=grafana,ou=service-users,dc=auro,dc=re
|
||||
bind_password: "{{ vault_ldap_grafana_password }}"
|
||||
search_base_dns: "cn=Utilisateurs,dc=auro,dc=re"
|
||||
group_search_base_dns: "ou=posix,ou=groups,dc=auro,dc=re"
|
||||
editors_group_dn:
|
||||
- cn=sudoldap,ou=posix,ou=groups,dc=auro,dc=re
|
||||
- cn=technicien,ou=posix,ou=groups,dc=auro,dc=re
|
||||
update_motd:
|
||||
grafana: Grafana est déployé (/etc/grafana).
|
||||
roles:
|
||||
- grafana
|
||||
- update_motd
|
213
playbooks/ifupdown2.yml
Executable file
213
playbooks/ifupdown2.yml
Executable file
|
@ -0,0 +1,213 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts:
|
||||
- ntp-1.int.infra.auro.re
|
||||
- dns-1.int.infra.auro.re
|
||||
- dhcp-1.isp.auro.re
|
||||
- dhcp-2.isp.auro.re
|
||||
- isp-1.rtr.infra.auro.re
|
||||
- isp-2.rtr.infra.auro.re
|
||||
vars:
|
||||
# TODO: netbox
|
||||
ifupdown2__hosts:
|
||||
ntp-1.int.infra.auro.re:
|
||||
ens18:
|
||||
gateways:
|
||||
- 2a09:6840:128::254
|
||||
- 10.128.0.254
|
||||
addresses:
|
||||
- 2a09:6840:128::203/56
|
||||
- 10.128.0.203/16
|
||||
dns-1.int.infra.auro.re:
|
||||
ens18:
|
||||
gateways:
|
||||
- 2a09:6840:128::254
|
||||
- 10.128.0.254
|
||||
addresses:
|
||||
- 2a09:6840:128::127/56
|
||||
- 10.128.0.127/16
|
||||
dhcp-1.isp.auro.re:
|
||||
ens18:
|
||||
gateways:
|
||||
- 2a09:6840:128::254
|
||||
- 10.128.0.254
|
||||
addresses:
|
||||
- 2a09:6840:128::204/56
|
||||
- 10.128.0.204/16
|
||||
ens19: null
|
||||
clients:
|
||||
bridge_vlan_aware: true
|
||||
bridge_ports:
|
||||
- ens19
|
||||
bridge_vids:
|
||||
- 1000-1004
|
||||
client-0:
|
||||
addresses:
|
||||
- 100.64.0.2/27
|
||||
vlan_id: 1000
|
||||
vlan_raw_device: clients
|
||||
client-1:
|
||||
addresses:
|
||||
- 100.64.0.34/27
|
||||
vlan_id: 1001
|
||||
vlan_raw_device: clients
|
||||
client-2:
|
||||
addresses:
|
||||
- 100.64.0.66/27
|
||||
vlan_id: 1002
|
||||
vlan_raw_device: clients
|
||||
client-3:
|
||||
addresses:
|
||||
- 100.64.0.98/27
|
||||
vlan_id: 1003
|
||||
vlan_raw_device: clients
|
||||
client-4:
|
||||
addresses:
|
||||
- 100.64.0.130/27
|
||||
vlan_id: 1004
|
||||
vlan_raw_device: clients
|
||||
dhcp-2.isp.auro.re:
|
||||
ens18:
|
||||
gateways:
|
||||
- 2a09:6840:128::254
|
||||
- 10.128.0.254
|
||||
addresses:
|
||||
- 2a09:6840:128::91/56
|
||||
- 10.128.0.91/16
|
||||
ens19: null
|
||||
clients:
|
||||
bridge_vlan_aware: true
|
||||
bridge_ports:
|
||||
- ens19
|
||||
bridge_vids:
|
||||
- 1000-1004
|
||||
client-0:
|
||||
addresses:
|
||||
- 100.64.0.3/27
|
||||
vlan_id: 1000
|
||||
vlan_raw_device: clients
|
||||
client-1:
|
||||
addresses:
|
||||
- 100.64.0.35/27
|
||||
vlan_id: 1001
|
||||
vlan_raw_device: clients
|
||||
client-2:
|
||||
addresses:
|
||||
- 100.64.0.67/27
|
||||
vlan_id: 1002
|
||||
vlan_raw_device: clients
|
||||
client-3:
|
||||
addresses:
|
||||
- 100.64.0.99/27
|
||||
vlan_id: 1003
|
||||
vlan_raw_device: clients
|
||||
client-4:
|
||||
addresses:
|
||||
- 100.64.0.131/27
|
||||
vlan_id: 1004
|
||||
vlan_raw_device: clients
|
||||
isp-1.rtr.infra.auro.re:
|
||||
ens18:
|
||||
gateways:
|
||||
- 2a09:6840:128::254
|
||||
- 10.128.0.254
|
||||
addresses:
|
||||
- 2a09:6840:128::255/56
|
||||
- 10.128.0.255/16
|
||||
ens19: null
|
||||
clients:
|
||||
bridge_vlan_aware: true
|
||||
bridge_ports:
|
||||
- ens19
|
||||
bridge_vids:
|
||||
- 1000-1004
|
||||
bridge_disable_pvid: true
|
||||
forward: true
|
||||
ipv6_addrgen: false
|
||||
client-0:
|
||||
forward: true
|
||||
vlan_id: 1000
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-1:
|
||||
forward: true
|
||||
vlan_id: 1001
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-2:
|
||||
forward: true
|
||||
vlan_id: 1002
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-3:
|
||||
forward: true
|
||||
vlan_id: 1003
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-4:
|
||||
forward: true
|
||||
vlan_id: 1004
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
isp-2.rtr.infra.auro.re:
|
||||
ens18:
|
||||
gateways:
|
||||
- 2a09:6840:128::254
|
||||
- 10.128.0.254
|
||||
addresses:
|
||||
- 2a09:6840:128::158/56
|
||||
- 10.128.0.158/16
|
||||
ens19: null
|
||||
clients:
|
||||
bridge_vlan_aware: true
|
||||
bridge_ports:
|
||||
- ens19
|
||||
bridge_vids:
|
||||
- 1000-1004
|
||||
client-0:
|
||||
forward: true
|
||||
vlan_id: 1000
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-1:
|
||||
forward: true
|
||||
vlan_id: 1001
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-2:
|
||||
forward: true
|
||||
vlan_id: 1002
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-3:
|
||||
forward: true
|
||||
vlan_id: 1003
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
client-4:
|
||||
forward: true
|
||||
vlan_id: 1004
|
||||
vlan_raw_device: clients
|
||||
ipv6_addrgen: false
|
||||
ifupdown2__interfaces: "{{ ifupdown2__hosts[inventory_hostname] }}"
|
||||
roles:
|
||||
- ifupdown2
|
||||
|
||||
- hosts:
|
||||
- ntp-1.int.infra.auro.re
|
||||
- dns-1.int.infra.auro.re
|
||||
- dhcp-1.isp.auro.re
|
||||
- dhcp-2.isp.auro.re
|
||||
- isp-1.rtr.infra.auro.re
|
||||
- isp-2.rtr.infra.auro.re
|
||||
vars:
|
||||
resolvconf__nameservers:
|
||||
- 2a09:6840:128::127
|
||||
- 10.128.0.127
|
||||
resolvconf__domain: auro.re
|
||||
resolvconf__search:
|
||||
- "{{ inventory_hostname | remove_domain_suffix }}"
|
||||
- auro.re
|
||||
roles:
|
||||
- resolvconf
|
||||
...
|
9
playbooks/isc-dhcp-server.yml
Executable file
9
playbooks/isc-dhcp-server.yml
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: dhcp-*.adm.auro.re
|
||||
vars:
|
||||
update_motd:
|
||||
unbound: isc-dhcp-server est déployé.
|
||||
roles:
|
||||
- isc_dhcp_server
|
||||
- update_motd
|
32
playbooks/keepalived.yml
Executable file
32
playbooks/keepalived.yml
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts:
|
||||
- isp-1.rtr.infra.auro.re
|
||||
- isp-2.rtr.infra.auro.re
|
||||
vars:
|
||||
keepalived__virtual_router_id: 80
|
||||
keepalived__interface: ens18
|
||||
keepalived__virtual_addresses:
|
||||
client-0:
|
||||
- 100.64.0.1/27
|
||||
- 2a09:6841::/56
|
||||
- fe80::1/10
|
||||
client-1:
|
||||
- 100.64.0.33/27
|
||||
- 2a09:6841:0:100::/56
|
||||
- fe80::1/10
|
||||
client-2:
|
||||
- 100.64.0.65/27
|
||||
- 2a09:6841:0:100::/56
|
||||
- fe80::1/10
|
||||
client-3:
|
||||
- 100.64.0.97/27
|
||||
- 2a09:6841:0:200::/56
|
||||
- fe80::1/10
|
||||
client-4:
|
||||
- 100.64.0.129/27
|
||||
- 2a09:6841:0:300::/56
|
||||
- fe80::1/10
|
||||
roles:
|
||||
- keepalived
|
||||
...
|
17
playbooks/knot.yml
Executable file
17
playbooks/knot.yml
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: all
|
||||
roles: []
|
||||
|
||||
# WIP: Deploy authoritative DNS servers
|
||||
# - hosts: authoritative_dns
|
||||
# vars:
|
||||
# service_repo: https://gitlab.crans.org/nounous/re2o-dns.git
|
||||
# service_name: dns
|
||||
# service_version: crans
|
||||
# service_config:
|
||||
# hostname: re2o-server.adm.auro.re
|
||||
# username: service-user
|
||||
# password: "{{ vault_serviceuser_passwd }}"
|
||||
# roles:
|
||||
# - re2o_service
|
|
@ -1,7 +1,10 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: all
|
||||
roles: []
|
||||
|
||||
# Clone LDAP on local geographic location
|
||||
# DON'T DO THIS AS IT RECREATES THE REPLICA
|
||||
- hosts: ldap_replica
|
||||
roles:
|
||||
- ldap_replica
|
||||
# - hosts: ldap_replica
|
||||
# roles:
|
||||
# - ldap_replica
|
|
@ -1,18 +1,18 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Install Matrix Synapse on corresponding containers
|
||||
# Install Matrix Synapse
|
||||
- hosts: synapse.adm.auro.re
|
||||
vars:
|
||||
mxisd_releases: https://github.com/kamax-matrix/mxisd/releases
|
||||
mxisd_deb: "{{ mxisd_releases }}/download/v1.3.1/mxisd_1.3.1_all.deb"
|
||||
update_motd:
|
||||
matrix-synapse: matrix-synapse est déployé.
|
||||
matrix-appservice-irc: matrix-appservice-irc est déployé.
|
||||
matrix-appservice-webhooks: matrix-appservice-webhooks est déployé.
|
||||
roles:
|
||||
- debian_backports
|
||||
- nodejs
|
||||
- matrix_synapse
|
||||
- matrix_appservice_irc
|
||||
- matrix_appservice_webhooks
|
||||
|
||||
# Install Matrix services
|
||||
- hosts: matrix-services.adm.auro.re
|
||||
roles:
|
||||
- debian_backports
|
||||
- update_motd
|
|
@ -1,28 +1,26 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Docker hosts
|
||||
- hosts: docker-ovh.adm.auro.re,gitea.adm.auro.re,drone.adm.auro.re,stream.adm.auro.re,wikijs.adm.auro.re
|
||||
roles:
|
||||
- docker
|
||||
|
||||
# Deploy Passbolt
|
||||
- hosts: passbolt.adm.auro.re
|
||||
roles:
|
||||
- passbolt
|
||||
|
||||
- hosts: reverseproxy
|
||||
vars:
|
||||
certbot: '{{ loc_certbot | default(glob_certbot | default([])) }}'
|
||||
nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}'
|
||||
reverseproxy: '{{ glob_reverseproxy | default({}) | combine(loc_reverseproxy | default({})) }}'
|
||||
update_motd:
|
||||
nginx: >-
|
||||
Le reverse-proxy NGINX est déployé (/etc/nginx).
|
||||
roles:
|
||||
- certbot
|
||||
- nginx
|
||||
- update_motd
|
||||
|
||||
- hosts: nginx,!reverseproxy
|
||||
vars:
|
||||
certbot: '{{ loc_certbot | default(glob_certbot | default([])) }}'
|
||||
nginx: '{{ glob_nginx | default({}) | combine(loc_nginx | default({})) }}'
|
||||
update_motd:
|
||||
nginx: >-
|
||||
NGINX avec certbot est déployé (/etc/nginx).
|
||||
roles:
|
||||
- certbot
|
||||
- nginx
|
||||
- update_motd
|
|
@ -1,4 +1,13 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Postfix on non mailhost servers
|
||||
- hosts: all,!unifi
|
||||
vars:
|
||||
local_network: 10.128.0.0/16
|
||||
relay_host: proxy.adm.auro.re
|
||||
roles:
|
||||
- postfix_non_mailhost
|
||||
|
||||
# Deploy Re2o mail service
|
||||
- hosts: mail.auro.re
|
||||
vars:
|
||||
|
@ -10,4 +19,4 @@
|
|||
username: service-user
|
||||
password: "{{ vault_serviceuser_passwd }}"
|
||||
roles:
|
||||
- re2o-service
|
||||
- re2o_service
|
170
playbooks/postgresql.yml
Executable file
170
playbooks/postgresql.yml
Executable file
|
@ -0,0 +1,170 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Install and configure database servers at Saclay
|
||||
- hosts: bdd.adm.auro.re
|
||||
vars:
|
||||
postgresql:
|
||||
version: 13
|
||||
hosts:
|
||||
- database: nextcloud
|
||||
user: nextcloud
|
||||
net: 10.128.0.58/32
|
||||
method: md5
|
||||
- database: gitea
|
||||
user: gitea
|
||||
net: 10.128.0.60/32
|
||||
method: md5
|
||||
- database: wikijs
|
||||
user: wikijs
|
||||
net: 10.128.0.66/32
|
||||
method: md5
|
||||
- database: drone
|
||||
user: drone
|
||||
net: 10.128.0.64/32
|
||||
method: md5
|
||||
- database: netbox
|
||||
user: netbox
|
||||
net: 10.128.0.97/32
|
||||
method: md5
|
||||
- database: grafana
|
||||
user: grafana
|
||||
net: 10.128.0.98/32
|
||||
method: md5
|
||||
- database: dolibarr
|
||||
user: dolibarr
|
||||
net: 10.128.0.236/32
|
||||
method: md5
|
||||
- database: rt5
|
||||
user: rt5
|
||||
net: 10.128.0.123/32
|
||||
method: md5
|
||||
databases:
|
||||
- nextcloud
|
||||
- gitea
|
||||
- wikijs
|
||||
- drone
|
||||
- netbox
|
||||
- grafana
|
||||
- dolibarr
|
||||
- rt5
|
||||
users:
|
||||
- name: nextcloud
|
||||
database: nextcloud
|
||||
password: "{{ vault_postgresql_nextcloud_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: gitea
|
||||
database: gitea
|
||||
password: "{{ vault_postgresql_gitea_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: wikijs
|
||||
database: wikijs
|
||||
password: "{{ vault_postgresql_wikijs_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: drone
|
||||
database: drone
|
||||
password: "{{ vault_postgresql_drone_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: netbox
|
||||
database: netbox
|
||||
password: "{{ vault_postgresql_netbox_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: grafana
|
||||
database: grafana
|
||||
password: "{{ vault_postgresql_grafana_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: dolibarr
|
||||
database: dolibarr
|
||||
password: "{{ vault_postgresql_dolibarr_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: rt5
|
||||
database: rt5
|
||||
password: "{{ vault_postgresql_rt5_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
update_motd:
|
||||
postgresql: PostgreSQL est déployé.
|
||||
roles:
|
||||
- postgresql
|
||||
- update_motd
|
||||
|
||||
# Install and configure database servers at OVH
|
||||
- hosts: bdd-ovh.adm.auro.re
|
||||
vars:
|
||||
postgresql:
|
||||
version: 13
|
||||
hosts:
|
||||
- database: etherpad
|
||||
user: etherpad
|
||||
net: 10.128.0.150/32
|
||||
method: md5
|
||||
- database: codimd
|
||||
user: codimd
|
||||
net: 10.128.0.150/32
|
||||
method: md5
|
||||
- database: synapse
|
||||
user: synapse
|
||||
net: 10.128.0.56/32
|
||||
method: md5
|
||||
- database: kanboard
|
||||
user: kanboard
|
||||
net: 10.128.0.150/32
|
||||
method: md5
|
||||
- database: cas
|
||||
user: cas
|
||||
net: 10.128.0.150/32
|
||||
method: md5
|
||||
- database: appservice-discord
|
||||
user: appservice-discord
|
||||
net: 10.128.0.150/32
|
||||
method: md5
|
||||
databases:
|
||||
- synapse
|
||||
- codimd
|
||||
- etherpad
|
||||
- kanboard
|
||||
- cas
|
||||
- appservice-discord
|
||||
users:
|
||||
- name: synapse
|
||||
database: synapse
|
||||
password: "{{ vault_postgresql_synapse_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: codimd
|
||||
database: codimd
|
||||
password: "{{ vault_postgresql_codimd_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: etherpad
|
||||
database: etherpad
|
||||
password: "{{ vault_postgresql_etherpad_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: kanboard
|
||||
database: kanboard
|
||||
password: "{{ vault_postgresql_kanboard_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: cas
|
||||
database: cas
|
||||
password: "{{ vault_postgresql_cas_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
- name: appservice-discord
|
||||
database: appservice-discord
|
||||
password: "{{ vault_postgresql_appservice_discord_passwd }}"
|
||||
privs:
|
||||
- ALL
|
||||
update_motd:
|
||||
postgresql: PostgreSQL est déployé.
|
||||
roles:
|
||||
- postgresql
|
||||
- update_motd
|
||||
...
|
241
playbooks/prometheus.yml
Executable file
241
playbooks/prometheus.yml
Executable file
|
@ -0,0 +1,241 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: prometheus-fleming.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['fleming_pve'] + groups['fleming_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets: |
|
||||
{{ groups['fleming_unifi'] | list | sort }}
|
||||
prometheus_ilo_snmp_targets: |
|
||||
{{ groups['fleming_ilo'] | list | sort }}
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration fleming) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-pacaterie.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['pacaterie_pve'] + groups['pacaterie_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets: |
|
||||
{{ groups['pacaterie_unifi'] | list | sort }}
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-pn-1.ups.auro.re
|
||||
- ups-ps-1.ups.auro.re
|
||||
prometheus_ilo_snmp_targets: |
|
||||
{{ groups['pacaterie_ilo'] | list | sort }}
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration pacaterie) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-edc.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-ec-1.ups.auro.re
|
||||
# - ups-ec-2.ups.auro.re
|
||||
- ups-ec-3.ups.auro.re
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['edc_pve'] + groups['edc_vm'] + groups['edc_server'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets: |
|
||||
{{ groups['edc_unifi'] | list | sort }}
|
||||
prometheus_ilo_snmp_targets: |
|
||||
{{ groups['edc_ilo'] | list | sort }}
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration edc) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-gs.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['gs_pve'] + groups['gs_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets: |
|
||||
{{ groups['gs_unifi'] | list | sort }}
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-gk-1.ups.auro.re
|
||||
prometheus_apc_pdu_snmp_targets:
|
||||
- pdu-ga-1.ups.auro.re
|
||||
prometheus_ilo_snmp_targets: |
|
||||
{{ groups['gs_ilo'] | list | sort }}
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration gs) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-rives.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_ups_snmp_targets:
|
||||
- ups-r3-1.ups.auro.re
|
||||
- ups-r1-1.ups.auro.re
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['rives_pve'] + groups['rives_vm'] | list | sort }}
|
||||
prometheus_unifi_snmp_targets: |
|
||||
{{ groups['rives_unifi'] | list | sort }}
|
||||
prometheus_ilo_snmp_targets: |
|
||||
{{ groups['rives_ilo'] | list | sort }}
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration rives) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-aurore.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['aurore_pve'] + groups['aurore_vm'] | list | sort }}
|
||||
prometheus_postgresql_targets: |
|
||||
{{ groups['bdd'] + groups['radius'] | list | sort }}
|
||||
prometheus_switch_snmp_targets:
|
||||
- yggdrasil.switch.auro.re
|
||||
- sw-pn-serveurs.switch.auro.re
|
||||
- sw-ec-serveurs.switch.auro.re
|
||||
- sw-gk-serveurs.switch.auro.re
|
||||
- sw-fl-serveurs.switch.auro.re
|
||||
- sw-ff-uplink.switch.auro.re
|
||||
- sw-fl-core.switch.auro.re
|
||||
- sw-fd-vcore.switch.auro.re
|
||||
- sw-fl-vcore.switch.auro.re
|
||||
- sw-ff-vcore.switch.auro.re
|
||||
- sw-pn-core.switch.auro.re
|
||||
- sw-ec-core.switch.auro.re
|
||||
- sw-gk-core.switch.auro.re
|
||||
- sw-r3-core.switch.auro.re
|
||||
prometheus_ilo_snmp_targets: |
|
||||
{{ groups['aurore_ilo'] | list | sort }}
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration aurore) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-ovh.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_switch_community: "{{ vault_snmp_switch_community }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_servers_targets: |
|
||||
{{ groups['ovh_pve'] + groups['ovh_vm'] | list | sort }}
|
||||
prometheus_postgresql_targets:
|
||||
- bdd-ovh.adm.auro.re
|
||||
prometheus_docker_targets:
|
||||
- docker-ovh.adm.auro.re
|
||||
|
||||
update_motd:
|
||||
prometheus: >-
|
||||
Prometheus (en configuration ovh) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus
|
||||
- update_motd
|
||||
|
||||
- hosts: prometheus-federate.adm.auro.re
|
||||
vars:
|
||||
prometheus_alertmanager: docker-ovh.adm.auro.re:9093
|
||||
snmp_unifi_password: "{{ vault_snmp_unifi_password }}"
|
||||
snmp_pdu_user: "{{ vault_snmp_pdu_user }}"
|
||||
snmp_pdu_password: "{{ vault_snmp_pdu_password }}"
|
||||
snmp_ilo_user: aurore
|
||||
snmp_ilo_auth: "{{ vault_snmp_ilo_auth }}"
|
||||
snmp_ilo_priv: "{{ vault_snmp_ilo_priv }}"
|
||||
|
||||
prometheus_servers_targets:
|
||||
- prometheus-edc.adm.auro.re
|
||||
- prometheus-gs.adm.auro.re
|
||||
- prometheus-fleming.adm.auro.re
|
||||
- prometheus-pacaterie.adm.auro.re
|
||||
- prometheus-rives.adm.auro.re
|
||||
- prometheus-aurore.adm.auro.re
|
||||
- prometheus-ovh.adm.auro.re
|
||||
|
||||
update_motd:
|
||||
prometheus_federate: >-
|
||||
Prometheus (en configuration fédération) est déployé (/etc/prometheus).
|
||||
roles:
|
||||
- prometheus_federate
|
||||
- update_motd
|
||||
|
||||
# Postgres Exporters
|
||||
- hosts: bdd,radius
|
||||
roles:
|
||||
- prometheus_postgres
|
||||
|
||||
# Monitor all hosts
|
||||
- hosts: all,!edc_unifi,!fleming_unifi,!pacaterie_unifi,!gs_unifi,!rives_unifi,!aurore_testing_vm,!ovh_container
|
||||
roles:
|
||||
- prometheus_node
|
10
playbooks/radius.yml
Executable file
10
playbooks/radius.yml
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy Radius
|
||||
- hosts: radius-*.adm.auro.re
|
||||
vars:
|
||||
update_motd:
|
||||
unbound: FreeRADIUS est déployé.
|
||||
roles:
|
||||
- radius
|
||||
- update_motd
|
9
playbooks/root.yml
Executable file
9
playbooks/root.yml
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: all,!unifi
|
||||
vars:
|
||||
root_shell: /bin/bash
|
||||
root_password: "{{ vault_root_password }}"
|
||||
roles:
|
||||
- root_account
|
||||
...
|
23
playbooks/router.yml
Executable file
23
playbooks/router.yml
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy firewall and keepalived
|
||||
# radvd: IPv6 SLAAC (/64 subnets, private IPs).
|
||||
# Must NOT be on routeur-aurore-*, or will with DHCPv6!
|
||||
- hosts: ~routeur-(pacaterie|edc|fleming|gs|rives).*\.adm\.auro\.re
|
||||
vars:
|
||||
update_motd:
|
||||
unbound: Le routage (avec radvd) est déployé.
|
||||
roles:
|
||||
- router
|
||||
- radvd
|
||||
- update_motd
|
||||
|
||||
# No radvd here
|
||||
- hosts: ~routeur-aurore.*\.adm\.auro\.re
|
||||
vars:
|
||||
update_motd:
|
||||
unbound: Le routage (avec DHCPv6) est déployé.
|
||||
roles:
|
||||
- router
|
||||
- ipv6_edge_router
|
||||
- update_motd
|
10
playbooks/rsyslog.yml
Executable file
10
playbooks/rsyslog.yml
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: log.adm.auro.re
|
||||
roles:
|
||||
- rsyslog_collector
|
||||
|
||||
- hosts: all,!unifi
|
||||
roles:
|
||||
- rsyslog_common
|
||||
...
|
14
playbooks/ssh.yml
Executable file
14
playbooks/ssh.yml
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: all,!unifi
|
||||
vars:
|
||||
openssh_users_ca_public_key:
|
||||
"ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAAB\
|
||||
hBIpT7d7WeR88bs53KkNkZNOzkPJ7CQ5Ui6Wl9LXzAjjIdH+hKJieBMHrKew7+kzxGYaTqXW\
|
||||
F1fQWsACG6aniy7VZpsdgTaNw7qr9frGfmo950V7IlU6w1HRc5c+3oVBWpg=="
|
||||
openssh_authorized_principals:
|
||||
- any
|
||||
- "{{ inventory_hostname }}"
|
||||
roles:
|
||||
- openssh_server
|
||||
...
|
17
playbooks/switchs-manager.yml
Executable file
17
playbooks/switchs-manager.yml
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: all
|
||||
roles: []
|
||||
|
||||
# Deploy Re2o switch service
|
||||
# - hosts: switchs-manager.adm.auro.re
|
||||
# vars:
|
||||
# service_repo: https://gitlab.federez.net/re2o/switchs.git
|
||||
# service_name: switchs
|
||||
# service_version: master
|
||||
# service_config:
|
||||
# hostname: re2o-server.adm.auro.re
|
||||
# username: service-user
|
||||
# password: "{{ vault_serviceuser_passwd }}"
|
||||
# roles:
|
||||
# - re2o_service
|
10
playbooks/unbound.yml
Executable file
10
playbooks/unbound.yml
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# Deploy unbound DNS server (recursive).
|
||||
- hosts: dns-*.adm.auro.re,!dns-aurore*.adm.auro.re
|
||||
vars:
|
||||
update_motd:
|
||||
unbound: Unbound est déployé.
|
||||
roles:
|
||||
- unbound
|
||||
- update_motd
|
9
playbooks/unifi.yml
Executable file
9
playbooks/unifi.yml
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: all
|
||||
roles: []
|
||||
|
||||
# Deploy Unifi Controller
|
||||
# - hosts: unifi-fleming.adm.auro.re,unifi-pacaterie.adm.auro.re
|
||||
# roles:
|
||||
# - unifi-controller
|
432
proxmox.yml
432
proxmox.yml
|
@ -1,432 +0,0 @@
|
|||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
# This is a special playbook to create a new VM !
|
||||
- hosts: proxy.adm.auro.re # Host with python-proxmoxer and python-requests
|
||||
become: false # We do not need root as we use Proxmox API
|
||||
|
||||
vars:
|
||||
vm_definitions:
|
||||
|
||||
# Réseau Pacaterie
|
||||
- name: ldap-replica-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
|
||||
# Réseau Fleming
|
||||
- name: ldap-replica-fleming1
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
|
||||
# Réseau EdC
|
||||
- name: ldap-replica-edc1
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
|
||||
# Réseau George Sand
|
||||
- name: ldap-replica-gs1
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-gs
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-gs
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-gs
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-gs
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-gs
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
|
||||
vars_prompt:
|
||||
- name: "password"
|
||||
prompt: "Enter LDAP password for your user"
|
||||
private: true
|
||||
|
||||
tasks:
|
||||
- name: Define a virtual machine in Proxmox
|
||||
proxmox_kvm:
|
||||
api_user: "{{ ansible_user_id }}@pam"
|
||||
api_password: "{{ password }}"
|
||||
api_host: "{{ item.virtu }}.adm.auro.re"
|
||||
name: "{{ item.name }}"
|
||||
node: "{{ item.virtu }}"
|
||||
scsihw: virtio-scsi-pci
|
||||
scsi: '{"scsi0":"{{ item.virtu }}:{{ item.disksize }},format=raw"}'
|
||||
sata: '{"sata0":"local:iso/{{ item.installiso }},media=cdrom"}'
|
||||
net: '{"net0":"virtio,bridge=vmbr2"}' # Adm only by default
|
||||
cores: "{{ item.cores }}"
|
||||
memory: "{{ item.memory }}"
|
||||
balloon: "{{ item.memory // 2 }}"
|
||||
bios: seabios # Ansible module doesn't support UEFI boot disk
|
||||
loop:
|
||||
# Réseau Fleming
|
||||
- name: ldap-replica-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
- name: routeur-fleming
|
||||
virtu: freya
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
|
||||
- name: ldap-replica-fleming-fo
|
||||
virtu: marki
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-fleming-fo
|
||||
virtu: marki
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-fleming-fo
|
||||
virtu: marki
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-fleming-fo
|
||||
virtu: marki
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-fleming-fo
|
||||
virtu: marki
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: routeur-fleming-fo
|
||||
virtu: marki
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
|
||||
# Réseau Pacaterie
|
||||
- name: ldap-replica-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
- name: routeur-pacaterie
|
||||
virtu: mordred
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
|
||||
- name: ldap-replica-pacaterie-fo
|
||||
virtu: titan
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-pacaterie-fo
|
||||
virtu: titan
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-pacaterie-fo
|
||||
virtu: titan
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-pacaterie-fo
|
||||
virtu: titan
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-pacaterie-fo
|
||||
virtu: titan
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: routeur-pacaterie-fo
|
||||
virtu: titan
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
|
||||
# Réseau EDC
|
||||
- name: ldap-replica-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
- name: routeur-edc
|
||||
virtu: chapalux
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
|
||||
# Réseau George Sand
|
||||
- name: ldap-replica-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dhcp-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: dns-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: prometheus-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: radius-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
||||
- name: unifi-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-9.9.0-amd64-netinst.iso
|
||||
- name: routeur-georgesand
|
||||
virtu: perceval
|
||||
cores: 2 # 2 mimimum, 10 maximum
|
||||
memory: 1024 # M
|
||||
disksize: 16 # G
|
||||
installiso: debian-10.0.0-amd64-netinst.iso
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
# {{ ansible_managed }}
|
||||
uname -snrvm
|
|
@ -9,8 +9,6 @@
|
|||
- aptitude # nice to have for Ansible
|
||||
- bash-completion # because bash
|
||||
- curl # better than wget
|
||||
- emacs-nox # for maman
|
||||
- fish # to motivate @edpibu
|
||||
- git # code versioning
|
||||
- htop # better than top
|
||||
- iotop # monitor i/o
|
||||
|
@ -18,35 +16,19 @@
|
|||
- lsb-release
|
||||
- molly-guard # prevent reboot
|
||||
- nano # for vulcain
|
||||
- net-tools
|
||||
- ntp # network time sync
|
||||
- oidentd # postgresql identification
|
||||
- screen # Vulcain asked for this
|
||||
- sudo
|
||||
- tmux # For shirenn
|
||||
- tree # create a graphical tree of files
|
||||
- vim # better than nano
|
||||
- zsh # to be able to ssh @erdnaxe
|
||||
- dnsutils # dig
|
||||
update_cache: true
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
# Pimp my server
|
||||
- name: Customize motd
|
||||
copy:
|
||||
src: "update-motd.d/{{ item }}"
|
||||
dest: "/etc/update-motd.d/{{ item }}"
|
||||
mode: 0755
|
||||
loop:
|
||||
- 00-logo
|
||||
- 10-uname
|
||||
|
||||
- name: Remove Debian warranty motd
|
||||
file:
|
||||
path: /etc/motd
|
||||
state: absent
|
||||
|
||||
# Configure APT mirrors on Debian Stretch
|
||||
- name: Configure APT mirrors
|
||||
when:
|
||||
|
|
8
roles/borgbackup_client/defaults/main.yml
Normal file
8
roles/borgbackup_client/defaults/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
borg_keep_hourly: 0
|
||||
borg_keep_daily: 0
|
||||
borg_keep_weekly: 0
|
||||
borg_keep_monthly: 0
|
||||
borg_server_user: borgbackup
|
||||
borg_server_group: borgbackup
|
||||
...
|
5
roles/borgbackup_client/handlers/main.yml
Normal file
5
roles/borgbackup_client/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Run systemd daemon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
...
|
110
roles/borgbackup_client/tasks/main.yml
Normal file
110
roles/borgbackup_client/tasks/main.yml
Normal file
|
@ -0,0 +1,110 @@
|
|||
---
|
||||
- name: Pin borgmatic
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=
|
||||
loop:
|
||||
- src: apt/list.j2
|
||||
dest: /etc/apt/sources.list.d/bullseye.list
|
||||
- src: apt/preferences.j2
|
||||
dest: /etc/apt/preferences.d/borgmatic-bullseye
|
||||
when:
|
||||
- "ansible_distribution == 'Debian'"
|
||||
- "ansible_distribution_major_version in ('stretch', 'buster', '9', '10')"
|
||||
|
||||
- name: Install borgmatic
|
||||
apt:
|
||||
name: borgmatic
|
||||
update_cache: true
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Create configuration directory for borgmatic
|
||||
file:
|
||||
path: /etc/borgmatic
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rwx,g=rx,o=
|
||||
|
||||
- name: Add borgmatic configuration file
|
||||
become: true
|
||||
template:
|
||||
src: config.yaml.j2
|
||||
dest: /etc/borgmatic/config.yaml
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=
|
||||
vars:
|
||||
borg_host_dir: "/borg/{{ inventory_hostname }}"
|
||||
|
||||
- name: Create SSH key
|
||||
openssh_keypair:
|
||||
path: "/etc/borgmatic/id_remote"
|
||||
type: ed25519
|
||||
regenerate: full_idempotence
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=,o=
|
||||
register: ssh_key
|
||||
|
||||
- name: Gather SSH host keys
|
||||
delegate_to: "{{ borg_server_host }}"
|
||||
command: "ssh-keyscan {{ borg_server_host }}"
|
||||
register: keys
|
||||
|
||||
- name: Add server key to known hosts
|
||||
known_hosts:
|
||||
hash_host: true
|
||||
host: "{{ borg_server_host }}"
|
||||
key: "{{ item }}"
|
||||
loop: "{{ keys.stdout_lines }}"
|
||||
|
||||
- name: Add public key to remote
|
||||
delegate_to: "{{ borg_server_host }}"
|
||||
become: true
|
||||
authorized_key:
|
||||
exclusive: false
|
||||
user: "{{ borg_server_user }}"
|
||||
key: "{{ ssh_key.public_key }}"
|
||||
key_options: "{{ options | join(',') }}"
|
||||
vars:
|
||||
borg_host_dir: "/borg/{{ inventory_hostname }}"
|
||||
options:
|
||||
- 'command="borg serve --restrict-to-path {{ borg_host_dir }}"'
|
||||
- no-agent-forwarding
|
||||
- no-port-forwarding
|
||||
- no-pty
|
||||
- no-user-rc
|
||||
- no-X11-forwarding
|
||||
|
||||
- name: Init repository
|
||||
command: borgmatic init --encryption repokey
|
||||
|
||||
- name: Install timer and service for borgmatic
|
||||
template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "/etc/systemd/system/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=
|
||||
loop:
|
||||
- borgmatic.timer
|
||||
- borgmatic.service
|
||||
notify:
|
||||
- Run systemd daemon-reload
|
||||
|
||||
- name: Run systemd deamon-reload
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Start and enable borgmatic timer
|
||||
systemd:
|
||||
name: borgmatic.timer
|
||||
state: started
|
||||
enabled: true
|
||||
...
|
3
roles/borgbackup_client/templates/apt/list.j2
Normal file
3
roles/borgbackup_client/templates/apt/list.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
deb https://deb.debian.org/debian/ bullseye main
|
9
roles/borgbackup_client/templates/apt/preferences.j2
Normal file
9
roles/borgbackup_client/templates/apt/preferences.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
Package: *
|
||||
Pin: release n=bullseye
|
||||
Pin-Priority: 1
|
||||
|
||||
Package: borgmatic
|
||||
Pin: release n=bullseye
|
||||
Pin-Priority: 900
|
32
roles/borgbackup_client/templates/borgmatic.service.j2
Normal file
32
roles/borgbackup_client/templates/borgmatic.service.j2
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Service for borgmatic backup
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
ConditionACPower=true
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ProtectSystem=full
|
||||
CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_NET_RAW
|
||||
|
||||
# Lower CPU and I/O priority.
|
||||
Nice=19
|
||||
CPUSchedulingPolicy=batch
|
||||
IOSchedulingClass=best-effort
|
||||
IOSchedulingPriority=7
|
||||
IOWeight=100
|
||||
|
||||
Restart=no
|
||||
# Prevent rate limiting of borgmatic log events. If you are using an older
|
||||
# version of systemd that doesn't support this (pre-240 or so), you may have
|
||||
# to remove this option.
|
||||
LogRateLimitIntervalSec=0
|
||||
|
||||
# Delay start to prevent backups running during boot. Note that
|
||||
# systemd-inhibit requires dbus and dbus-user-session to be installed.
|
||||
# ExecStartPre=sleep 1m
|
||||
ExecStart=systemd-inhibit --who="borgmatic" \
|
||||
--why="Prevent interrupting scheduled backup" \
|
||||
/usr/bin/borgmatic -v 2
|
17
roles/borgbackup_client/templates/borgmatic.timer.j2
Normal file
17
roles/borgbackup_client/templates/borgmatic.timer.j2
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
[Unit]
|
||||
Description=Timer for borgmatic backup
|
||||
|
||||
[Timer]
|
||||
{% if borg_keep_hourly > 0 %}
|
||||
OnCalendar=hourly
|
||||
RandomizedDelaySec=60m
|
||||
{% else %}
|
||||
OnCalendar=daily
|
||||
RandomizedDelaySec=24h
|
||||
{% endif %}
|
||||
FixedRandomDelay=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
51
roles/borgbackup_client/templates/config.yaml.j2
Normal file
51
roles/borgbackup_client/templates/config.yaml.j2
Normal file
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
location:
|
||||
source_directories:
|
||||
{% for source in borg_backup_directories %}
|
||||
- {{ source }}
|
||||
{% endfor %}
|
||||
exclude_patterns:
|
||||
{% for exclude in borg_backup_exclude %}
|
||||
- {{ exclude }}
|
||||
{% endfor %}
|
||||
repositories:
|
||||
- {{ borg_server_user }}@{{ borg_server_host }}:{{ borg_host_dir }}
|
||||
borgmatic_source_directory: /var/backups
|
||||
|
||||
storage:
|
||||
encryption_passphrase: "{{ borg_encryption_passphrase }}"
|
||||
ssh_command: ssh -i /etc/borgmatic/id_remote
|
||||
# compression: 'lz4'
|
||||
# umask: 0077
|
||||
# lock_wait: 5
|
||||
# archive_name_format: '{hostname}-{now}'
|
||||
|
||||
|
||||
retention:
|
||||
{% if borg_keep_hourly > 0 %}
|
||||
keep_hourly: {{ borg_keep_hourly }}
|
||||
{% endif %}
|
||||
{% if borg_keep_daily > 0 %}
|
||||
keep_daily: {{ borg_keep_daily }}
|
||||
{% endif %}
|
||||
{% if borg_keep_weekly > 0 %}
|
||||
keep_weekly: {{ borg_keep_weekly }}
|
||||
{% endif %}
|
||||
{% if borg_keep_monthly > 0 %}
|
||||
keep_monthly: {{ borg_keep_monthly }}
|
||||
{% endif %}
|
||||
|
||||
consistency:
|
||||
checks:
|
||||
- repository
|
||||
- archives
|
||||
|
||||
{% if borg_postgresql_databases is defined %}
|
||||
hooks:
|
||||
postgresql_databases:
|
||||
- name: all
|
||||
username: postgres
|
||||
{% endif %}
|
||||
...
|
5
roles/borgbackup_server/defaults/main.yml
Normal file
5
roles/borgbackup_server/defaults/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
borg_server_user: borgbackup
|
||||
borg_server_group: borgbackup
|
||||
borg_home_dir: /var/lib/borgbackup
|
||||
...
|
38
roles/borgbackup_server/tasks/main.yml
Normal file
38
roles/borgbackup_server/tasks/main.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
- name: Install borg
|
||||
apt:
|
||||
name: borgbackup
|
||||
state: present
|
||||
update_cache: true
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Create a local group for borg
|
||||
become: true
|
||||
group:
|
||||
name: "{{ borg_server_group }}"
|
||||
system: true
|
||||
|
||||
- name: Create a local user for borg
|
||||
become: true
|
||||
user:
|
||||
home: "{{ borg_home_dir }}"
|
||||
create_home: true
|
||||
comment: Local user for borgbackup server
|
||||
name: "{{ borg_server_user }}"
|
||||
group: "{{ borg_server_group }}"
|
||||
system: true
|
||||
# Does not constitute a valid hash, preventing from login via password
|
||||
password: "*"
|
||||
update_password: always
|
||||
|
||||
- name: Create backup directory
|
||||
become: true
|
||||
file:
|
||||
path: "{{ borg_server_backups_dir }}"
|
||||
state: directory
|
||||
owner: "{{ borg_server_user }}"
|
||||
group: "{{ borg_server_group }}"
|
||||
mode: u=rwx,g=,o=
|
||||
...
|
11
roles/chronyd/defaults/main.yml
Normal file
11
roles/chronyd/defaults/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
chronyd__pools: []
|
||||
chronyd__key_file: /etc/chrony/chrony.keys
|
||||
chronyd__drift_file: /var/lib/chrony/chrony.drift
|
||||
chronyd__nts_dump_dir: /var/lib/chrony
|
||||
chronyd__log_dir: /var/log/chrony
|
||||
chronyd__max_update_skew: 100.0
|
||||
chronyd__rtcsync: true
|
||||
chronyd__allow_networks: []
|
||||
chronyd__log_change_seconds: 0.5
|
||||
...
|
6
roles/chronyd/handlers/main.yml
Normal file
6
roles/chronyd/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Restart chronyd
|
||||
systemd:
|
||||
name: chrony.service
|
||||
state: restarted
|
||||
...
|
32
roles/chronyd/tasks/main.yml
Normal file
32
roles/chronyd/tasks/main.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
- name: Uninstall ntp and sntp
|
||||
apt:
|
||||
name:
|
||||
- sntp
|
||||
- ntp
|
||||
- systemd-timesyncd
|
||||
state: absent
|
||||
|
||||
- name: Install chronyd
|
||||
apt:
|
||||
name: chrony
|
||||
|
||||
- name: Configure chronyd
|
||||
template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "/etc/chrony/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=
|
||||
loop:
|
||||
- chrony.conf
|
||||
- chrony.keys
|
||||
notify:
|
||||
- Restart chronyd
|
||||
|
||||
- name: Enable and start chronyd
|
||||
systemd:
|
||||
name: chrony.service
|
||||
enabled: true
|
||||
state: started
|
||||
...
|
30
roles/chronyd/templates/chrony.conf.j2
Normal file
30
roles/chronyd/templates/chrony.conf.j2
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for pool in chronyd__pools %}
|
||||
pool {{ pool }} iburst
|
||||
{% endfor %}
|
||||
|
||||
keyfile {{ chronyd__key_file }}
|
||||
driftfile {{ chronyd__drift_file }}
|
||||
ntsdumpdir {{ chronyd__nts_dump_dir }}
|
||||
logdir {{ chronyd__log_dir }}
|
||||
|
||||
log tracking measurements statistics
|
||||
|
||||
maxupdateskew {{ chronyd__max_update_skew | float }}
|
||||
|
||||
{% if chronyd__rtcsync %}
|
||||
rtcsync
|
||||
{% endif %}
|
||||
|
||||
{% if chronyd__local_stratum is defined %}
|
||||
local stratum {{ chronyd__local_stratum | int }}
|
||||
{% endif %}
|
||||
|
||||
logchange {{ chronyd__log_change_seconds | float }}
|
||||
|
||||
leapsectz right/UTC
|
||||
|
||||
{% for network in chronyd__allow_networks %}
|
||||
allow {{ network | ipaddr }}
|
||||
{% endfor %}
|
1
roles/chronyd/templates/chrony.keys.j2
Normal file
1
roles/chronyd/templates/chrony.keys.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ ansible_managed | comment }}
|
|
@ -50,9 +50,4 @@
|
|||
url: https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-x86_64
|
||||
dest: /usr/local/bin/docker-compose
|
||||
mode: "0755"
|
||||
|
||||
- name: Indicate role in motd
|
||||
template:
|
||||
src: update-motd.d/05-service.j2
|
||||
dest: /etc/update-motd.d/05-docker
|
||||
mode: 0755
|
||||
...
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
# {{ ansible_managed }}
|
||||
echo "> Les recettes Docker-compose se trouvent dans /var/local/ansible-docker"
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
# For DokuWiki package
|
||||
- name: Configure Debian Buster mirrors
|
||||
when:
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_distribution_release == 'stretch'
|
||||
template:
|
||||
src: apt/buster.list.j2
|
||||
dest: /etc/apt/sources.list.d/buster.list
|
||||
mode: 0644
|
||||
|
||||
# For DokuWiki package
|
||||
- name: Configure DokuWiki pin
|
||||
when:
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_distribution_release == 'stretch'
|
||||
template:
|
||||
src: apt/dokuwiki.j2
|
||||
dest: /etc/apt/preferences.d/dokuwiki
|
||||
mode: 0644
|
||||
|
||||
# Install
|
||||
- name: Install DokuWiki
|
||||
apt:
|
||||
update_cache: true
|
||||
name: dokuwiki
|
||||
state: present
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
|
@ -1,9 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
{# #}
|
||||
{# Default mirror #}
|
||||
{% if debian_mirror is not defined %}
|
||||
{% set debian_mirror = 'http://ftp.fr.debian.org/debian' %}
|
||||
{% endif %}
|
||||
|
||||
deb {{ debian_mirror }} buster main
|
||||
deb-src {{ debian_mirror }} buster main
|
|
@ -1,9 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
Package: *
|
||||
Pin: release n=stretch*
|
||||
Pin-Priority: 990
|
||||
|
||||
Package: dokuwiki
|
||||
Pin: release n=buster
|
||||
Pin-Priority: 990
|
5
roles/grafana/handlers/main.yml
Normal file
5
roles/grafana/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Restart grafana
|
||||
service:
|
||||
name: grafana-server
|
||||
state: restarted
|
111
roles/grafana/tasks/main.yml
Normal file
111
roles/grafana/tasks/main.yml
Normal file
|
@ -0,0 +1,111 @@
|
|||
---
|
||||
- name: Install gpg (to import Grafana key)
|
||||
apt:
|
||||
name: gpg
|
||||
state: present
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Import Grafana GPG signing key
|
||||
apt_key:
|
||||
url: https://packages.grafana.com/gpg.key
|
||||
state: present
|
||||
register: apt_key_result
|
||||
retries: 3
|
||||
until: apt_key_result is succeeded
|
||||
|
||||
- name: Add Grafana repository
|
||||
apt_repository:
|
||||
repo: deb https://packages.grafana.com/oss/deb stable main
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install Grafana
|
||||
apt:
|
||||
name: grafana
|
||||
state: present
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Configure Grafana
|
||||
ini_file:
|
||||
path: /etc/grafana/grafana.ini
|
||||
section: "{{ item.section }}"
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
mode: 0640
|
||||
loop:
|
||||
- section: server
|
||||
option: root_url
|
||||
value: "{{ grafana.root_url }}"
|
||||
- section: analytics
|
||||
option: reporting_enabled
|
||||
value: "false"
|
||||
- section: analytics
|
||||
option: check_for_updates
|
||||
value: "false"
|
||||
- section: security
|
||||
option: disable_initial_admin_creation
|
||||
value: "true"
|
||||
- section: security
|
||||
option: cookie_secure
|
||||
value: "true"
|
||||
- section: security
|
||||
option: disable_gravatar
|
||||
value: "true"
|
||||
- section: snapshots
|
||||
option: external_enabled
|
||||
value: "false"
|
||||
- section: users
|
||||
option: allow_sign_up
|
||||
value: "false"
|
||||
- section: users
|
||||
option: allow_org_create
|
||||
value: "false"
|
||||
- section: auth.anonymous
|
||||
option: enabled
|
||||
value: "false" # no public access
|
||||
- section: auth.anonymous
|
||||
option: hide_version
|
||||
value: "true"
|
||||
- section: auth.basic # only LDAP auth
|
||||
option: enabled
|
||||
value: "false"
|
||||
- section: auth.ldap
|
||||
option: enabled
|
||||
value: "true"
|
||||
- section: alerting
|
||||
option: enabled
|
||||
value: "false"
|
||||
- section: database
|
||||
option: type
|
||||
value: "{{ grafana.database.type }}"
|
||||
- section: database
|
||||
option: host
|
||||
value: "{{ grafana.database.host }}"
|
||||
- section: database
|
||||
option: name
|
||||
value: "{{ grafana.database.name }}"
|
||||
- section: database
|
||||
option: user
|
||||
value: "{{ grafana.database.user }}"
|
||||
- section: database
|
||||
option: password
|
||||
value: "{{ grafana.database.password }}"
|
||||
notify: Restart grafana
|
||||
|
||||
- name: Configure Grafana LDAP
|
||||
template:
|
||||
src: ldap.toml.j2
|
||||
dest: /etc/grafana/ldap.toml
|
||||
mode: 0640
|
||||
notify: Restart grafana
|
||||
|
||||
- name: Enable and start Grafana
|
||||
systemd:
|
||||
name: grafana-server
|
||||
enabled: true
|
||||
state: started
|
||||
daemon_reload: true
|
61
roles/grafana/templates/ldap.toml.j2
Normal file
61
roles/grafana/templates/ldap.toml.j2
Normal file
|
@ -0,0 +1,61 @@
|
|||
{{ ansible_managed | comment }}
|
||||
# To troubleshoot and get more log info enable ldap debug logging in grafana.ini
|
||||
# [log]
|
||||
# filters = ldap:debug
|
||||
|
||||
[[servers]]
|
||||
# Ldap server host (specify multiple hosts space separated)
|
||||
host = "{{ grafana.ldap.host }}"
|
||||
# Default port is 389 or 636 if use_ssl = true
|
||||
port = 389
|
||||
# Set to true if ldap server supports TLS
|
||||
use_ssl = false
|
||||
# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
|
||||
start_tls = false
|
||||
# set to true if you want to skip ssl cert validation
|
||||
ssl_skip_verify = false
|
||||
# set to the path to your root CA certificate or leave unset to use system defaults
|
||||
# root_ca_cert = "/path/to/certificate.crt"
|
||||
# Authentication against LDAP servers requiring client certificates
|
||||
# client_cert = "/path/to/client.crt"
|
||||
# client_key = "/path/to/client.key"
|
||||
|
||||
# Search user bind dn
|
||||
bind_dn = "{{ grafana.ldap.bind_dn }}"
|
||||
# Search user bind password
|
||||
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
|
||||
bind_password = '{{ grafana.ldap.bind_password }}'
|
||||
|
||||
# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
|
||||
search_filter = "(cn=%s)"
|
||||
|
||||
# An array of base dns to search through
|
||||
search_base_dns = ["{{ grafana.ldap.search_base_dns }}"]
|
||||
|
||||
## For Posix or LDAP setups that does not support member_of attribute you can define the below settings
|
||||
## Please check grafana LDAP docs for examples
|
||||
group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
|
||||
group_search_base_dns = ["{{ grafana.ldap.group_search_base_dns }}"]
|
||||
group_search_filter_user_attribute = "cn"
|
||||
|
||||
# Specify names of the ldap attributes your ldap uses
|
||||
[servers.attributes]
|
||||
name = "sn"
|
||||
surname = ""
|
||||
username = "cn"
|
||||
member_of = "dn"
|
||||
email = "mail"
|
||||
|
||||
# Editors
|
||||
{% for group_dn in grafana.ldap.editors_group_dn %}
|
||||
[[servers.group_mappings]]
|
||||
group_dn = "{{ group_dn }}"
|
||||
org_role = "Editor"
|
||||
{% endfor %}
|
||||
|
||||
# Viewers
|
||||
[[servers.group_mappings]]
|
||||
# If you want to match all (or no ldap groups) then you can use wildcard
|
||||
group_dn = "*"
|
||||
org_role = "Viewer"
|
||||
|
3
roles/ifupdown2/defaults/main.yml
Normal file
3
roles/ifupdown2/defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
ifupdown2__interfaces: {}
|
||||
...
|
9
roles/ifupdown2/handlers/main.yml
Normal file
9
roles/ifupdown2/handlers/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- name: Restart networking
|
||||
systemd:
|
||||
name: networking.service
|
||||
state: restarted
|
||||
|
||||
- name: Bring all interfaces up
|
||||
shell: /usr/sbin/ifup -a
|
||||
...
|
42
roles/ifupdown2/tasks/main.yml
Normal file
42
roles/ifupdown2/tasks/main.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
- name: Gather package facts
|
||||
package_facts:
|
||||
manager: apt
|
||||
|
||||
- name: Check if ifupdown2 is installed
|
||||
set_fact:
|
||||
must_mask: "{{ 'ifupdown2' not in ansible_facts.packages }}"
|
||||
|
||||
- name: Mask networking before installing ifupdown2
|
||||
systemd:
|
||||
name: networking.service
|
||||
masked: true
|
||||
when: must_mask
|
||||
|
||||
- name: Install ifupdown2
|
||||
apt:
|
||||
name: ifupdown2
|
||||
|
||||
- name: Unmask networking now that ifupdown2 is installed
|
||||
systemd:
|
||||
name: networking.service
|
||||
masked: false
|
||||
when: must_mask
|
||||
|
||||
- name: Configure ifupdown2
|
||||
template:
|
||||
src: interfaces.j2
|
||||
dest: /etc/network/interfaces
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=
|
||||
notify:
|
||||
- Restart networking
|
||||
- Bring all interfaces up
|
||||
|
||||
- name: Enable and start networking
|
||||
systemd:
|
||||
name: networking.service
|
||||
state: started
|
||||
enabled: true
|
||||
...
|
41
roles/ifupdown2/templates/interfaces.j2
Normal file
41
roles/ifupdown2/templates/interfaces.j2
Normal file
|
@ -0,0 +1,41 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for name, iface in ifupdown2__interfaces.items() %}
|
||||
auto {{ name }}
|
||||
iface {{ name }}
|
||||
{% for address in iface.addresses | default([]) %}
|
||||
address {{ address | ipaddr }}
|
||||
{% endfor %}
|
||||
{% for gateway in iface.gateways | default([]) %}
|
||||
gateway {{ gateway | ipaddr }}
|
||||
{% endfor %}
|
||||
{% if iface.bridge_ports is defined %}
|
||||
bridge-ports {{ iface.bridge_ports | join(" ") }}
|
||||
{% endif %}
|
||||
{% if iface.bridge_vlan_aware is defined %}
|
||||
bridge-vlan-aware {{ iface.bridge_vlan_aware
|
||||
| ternary("yes", "no") }}
|
||||
{% endif %}
|
||||
{% if iface.bridge_vids is defined %}
|
||||
bridge-vids {{ iface.bridge_vids | join(",") }}
|
||||
{% endif %}
|
||||
{% if iface.vlan_id is defined %}
|
||||
vlan-id {{ iface.vlan_id | int }}
|
||||
{% endif %}
|
||||
{% if iface.vlan_raw_device is defined %}
|
||||
vlan-raw-device {{ iface.vlan_raw_device }}
|
||||
{% endif %}
|
||||
{% if iface.bridge_disable_pvid | default(false) %}
|
||||
bridge-pvid 0
|
||||
post-up bridge vlan del dev {{ name }} vid 1 self
|
||||
{% endif %}
|
||||
{% if iface.forward | default(false) %}
|
||||
ip-forward yes
|
||||
ip6-forward yes
|
||||
{% endif %}
|
||||
{% if iface.ipv6_addrgen is defined %}
|
||||
ipv6-addrgen {{ iface.ipv6_addrgen
|
||||
| ternary("yes", "no") }}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
7
roles/keepalived/defaults/main.yml
Normal file
7
roles/keepalived/defaults/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
keepalived__virtual_addresses: {}
|
||||
keepalived__notify_master: []
|
||||
keepalived__notify_backup: []
|
||||
keepalived__notify_fault: []
|
||||
keepalived__max_auto_priority: -1
|
||||
...
|
6
roles/keepalived/handlers/main.yml
Normal file
6
roles/keepalived/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Reload keepalived
|
||||
systemd:
|
||||
name: keepalived.service
|
||||
state: reloaded
|
||||
...
|
28
roles/keepalived/tasks/main.yml
Normal file
28
roles/keepalived/tasks/main.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Install keepalived
|
||||
apt:
|
||||
name: keepalived
|
||||
|
||||
- name: Configure keepalived
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "{{ item.mode }}"
|
||||
loop:
|
||||
- src: keepalived.conf.j2
|
||||
dest: /etc/keepalived/keepalived.conf
|
||||
mode: u=rw,g=,o=
|
||||
- src: notify.sh.j2
|
||||
dest: /etc/keepalived/notify.sh
|
||||
mode: u=rwx,g=,o=
|
||||
notify:
|
||||
- Reload keepalived
|
||||
|
||||
- name: Enable and start keepalived
|
||||
systemd:
|
||||
name: keepalived
|
||||
enabled: true
|
||||
state: started
|
||||
...
|
92
roles/keepalived/templates/keepalived.conf.j2
Normal file
92
roles/keepalived/templates/keepalived.conf.j2
Normal file
|
@ -0,0 +1,92 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
global_defs {
|
||||
dynamic_interfaces
|
||||
script_user root
|
||||
enable_script_security
|
||||
vrrp_version 3
|
||||
{% if keepalived__max_auto_priority is defined %}
|
||||
max_auto_priority {{ keepalived__max_auto_priority | int }}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
{%
|
||||
set ipv4_enabled =
|
||||
keepalived__ipv4_enabled
|
||||
| default(keepalived__virtual_addresses.values()
|
||||
| flatten | ansible.utils.ipv4)
|
||||
%}
|
||||
{%
|
||||
set ipv6_enabled =
|
||||
keepalived__ipv6_enabled
|
||||
| default(keepalived__virtual_addresses.values()
|
||||
| flatten | ansible.utils.ipv6)
|
||||
%}
|
||||
|
||||
{% if ipv4_enabled and ipv6_enabled %}
|
||||
vrrp_sync_group group {
|
||||
group {
|
||||
{% if ipv4_enabled %}
|
||||
instance_v4
|
||||
{% endif %}
|
||||
{% if ipv6_enabled %}
|
||||
instance_v6
|
||||
{% endif %}
|
||||
}
|
||||
notify_master "/etc/keepalived/notify.sh master"
|
||||
notify_backup "/etc/keepalived/notify.sh backup"
|
||||
notify_fault "/etc/keepalived/notify.sh fault"
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if ipv4_enabled %}
|
||||
vrrp_instance instance_v4 {
|
||||
virtual_router_id {{ keepalived__virtual_router_id | int }}
|
||||
interface {{ keepalived__interface }}
|
||||
state BACKUP
|
||||
priority 250
|
||||
nopreempt
|
||||
advert_int 1
|
||||
accept
|
||||
virtual_ipaddress {
|
||||
{% for dev, addresses in keepalived__virtual_addresses.items() %}
|
||||
{% for address in addresses %}
|
||||
{% if address | ansible.utils.ipv4 %}
|
||||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% if not (ipv4_enabled and ipv6_enabled) %}
|
||||
notify_master "/etc/keepalived/notify.sh master"
|
||||
notify_backup "/etc/keepalived/notify.sh backup"
|
||||
notify_fault "/etc/keepalived/notify.sh fault"
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if ipv6_enabled %}
|
||||
vrrp_instance instance_v6 {
|
||||
virtual_router_id {{ keepalived__virtual_router_id | int }}
|
||||
interface {{ keepalived__interface }}
|
||||
state BACKUP
|
||||
priority 250
|
||||
nopreempt
|
||||
advert_int 1
|
||||
accept
|
||||
virtual_ipaddress {
|
||||
{% for dev, addresses in keepalived__virtual_addresses.items() %}
|
||||
{% for address in addresses | ipaddr_sort(["link-local"]) %}
|
||||
{% if address | ansible.utils.ipv6 %}
|
||||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% if not (ipv4_enabled and ipv6_enabled) %}
|
||||
notify_master "/etc/keepalived/notify.sh master"
|
||||
notify_backup "/etc/keepalived/notify.sh backup"
|
||||
notify_fault "/etc/keepalived/notify.sh fault"
|
||||
{% endif %}
|
||||
}
|
||||
{% endif %}
|
33
roles/keepalived/templates/notify.sh.j2
Normal file
33
roles/keepalived/templates/notify.sh.j2
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
master=(
|
||||
{% for notify in keepalived__notify_master %}
|
||||
{{ notify | quote }}
|
||||
{% endfor %}
|
||||
)
|
||||
|
||||
backup=(
|
||||
{% for notify in keepalived__notify_backup %}
|
||||
{{ notify | quote }}
|
||||
{% endfor %}
|
||||
)
|
||||
|
||||
fault=(
|
||||
{% for notify in keepalived__notify_fault %}
|
||||
{{ notify | quote }}
|
||||
{% endfor %}
|
||||
)
|
||||
|
||||
case "$1" in
|
||||
master | backup | fault)
|
||||
scripts="$1[@]"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 (master|backup|fault)" >&2
|
||||
exit 1
|
||||
esac
|
||||
|
||||
for script in "${!scripts}"
|
||||
do
|
||||
eval "${script}"
|
||||
done
|
|
@ -21,4 +21,4 @@
|
|||
user: root
|
||||
key: "{{ ssh_pub_keys }}"
|
||||
state: present
|
||||
# exclusive: True
|
||||
exclusive: true
|
||||
|
|
|
@ -60,3 +60,4 @@ tls_cacertfile /etc/ssl/certs/ca-certificates.crt
|
|||
|
||||
# The search scope.
|
||||
#scope sub
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
- name: reload logrotate
|
||||
service:
|
||||
name: logrotate
|
||||
- name: Reload logrotate
|
||||
systemd:
|
||||
name: logrotate.service
|
||||
state: reloaded
|
||||
...
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
---
|
||||
# Install and configure logrotate
|
||||
|
||||
# Install the apt package
|
||||
- name: Install logrotate
|
||||
apt:
|
||||
name:
|
||||
- logrotate
|
||||
name: logrotate
|
||||
state: present
|
||||
|
||||
# Copy the configuration and reload the service if it has changed
|
||||
- name: Configure logrotate
|
||||
template:
|
||||
src: logrotate.d/rsyslog.j2
|
||||
dest: /etc/logrotate.d/rsyslog
|
||||
- name: Create rsyslog configuration directory
|
||||
file:
|
||||
path: /etc/rsyslog.d
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
notify: reload logrotate
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
|
||||
- name: Configure logrotate
|
||||
template:
|
||||
src: logrotate.conf
|
||||
dest: /etc/logrotate.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rwx,g=r,o=r
|
||||
notify: Reload logrotate
|
||||
|
||||
# Make sure the service is enabled and started
|
||||
- name: Enable logrotate service
|
||||
service:
|
||||
name: logrotate
|
||||
systemd:
|
||||
name: logrotate.service
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
# Enforce new logrotate rules now
|
||||
- name: Run logrotate now
|
||||
command: /usr/sbin/logrotate -f /etc/logrotate.d/rsyslog
|
||||
...
|
||||
|
|
24
roles/logrotate/templates/logrotate.conf
Normal file
24
roles/logrotate/templates/logrotate.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
# see "man logrotate" for details
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
# global options do not affect preceding include directives
|
||||
|
||||
# rotate log files weekly
|
||||
weekly
|
||||
|
||||
# keep 4 weeks worth of backlogs
|
||||
rotate 4
|
||||
|
||||
# create new (empty) log files after rotating old ones
|
||||
create
|
||||
|
||||
# use date as a suffix of the rotated file
|
||||
#dateext
|
||||
|
||||
# uncomment this if you want your log files compressed
|
||||
#compress
|
||||
|
||||
# packages drop log rotation information into this directory
|
||||
include /etc/logrotate.d
|
||||
|
||||
# system-specific logs may also be configured here.
|
|
@ -1,39 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
/var/log/syslog
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
compress
|
||||
postrotate
|
||||
/usr/lib/rsyslog/rsyslog-rotate
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/mail.info
|
||||
/var/log/mail.warn
|
||||
/var/log/mail.err
|
||||
/var/log/mail.log
|
||||
/var/log/daemon.log
|
||||
/var/log/kern.log
|
||||
/var/log/auth.log
|
||||
/var/log/user.log
|
||||
/var/log/lpr.log
|
||||
/var/log/cron.log
|
||||
/var/log/debug
|
||||
/var/log/messages
|
||||
{
|
||||
rotate 90
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/lib/rsyslog/rsyslog-rotate
|
||||
endscript
|
||||
}
|
|
@ -29,6 +29,24 @@
|
|||
dest: "/etc/nginx/sites-enabled/default"
|
||||
state: absent
|
||||
|
||||
- name: Add 'extended' log format
|
||||
template:
|
||||
src: nginx/conf.d/extended_log.conf.j2
|
||||
dest: /etc/nginx/conf.d/extended_log.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: Reload nginx
|
||||
|
||||
- name: Add syslog snippet
|
||||
template:
|
||||
src: nginx/snippets/syslog.conf.j2
|
||||
dest: /etc/nginx/snippets/syslog.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: Reload nginx
|
||||
|
||||
- name: Copy reverse proxy sites
|
||||
when: reverseproxy is defined
|
||||
template:
|
||||
|
@ -130,12 +148,6 @@
|
|||
group: www-data
|
||||
mode: 0644
|
||||
|
||||
- name: Indicate role in motd
|
||||
template:
|
||||
src: update-motd.d/05-service.j2
|
||||
dest: /etc/update-motd.d/05-nginx
|
||||
mode: 0755
|
||||
|
||||
- name: Clean old files
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
@ -144,3 +156,4 @@
|
|||
- "/etc/nginx/snippets/options-ssl.conf"
|
||||
- "/var/www/custom_401.html"
|
||||
- "/var/www/robots.txt"
|
||||
...
|
||||
|
|
7
roles/nginx/templates/nginx/conf.d/extended_log.conf.j2
Normal file
7
roles/nginx/templates/nginx/conf.d/extended_log.conf.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
log_format extended
|
||||
'$remote_addr $remote_port - $http_x_forwarded_for - $connection '
|
||||
'$remote_user [$time_local] '
|
||||
'"$host" "$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
|
@ -8,6 +8,8 @@ server {
|
|||
|
||||
server_name {{ site.from }};
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
{% for realip in nginx.real_ip_from %}
|
||||
set_real_ip_from {{ realip }};
|
||||
{% endfor %}
|
||||
|
@ -25,6 +27,8 @@ server {
|
|||
|
||||
server_name {{ site.from }};
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
# SSL common conf
|
||||
include "/etc/nginx/snippets/options-ssl.{{ site.ssl|default(nginx.default_ssl_domain) }}.conf";
|
||||
|
||||
|
@ -52,6 +56,8 @@ server {
|
|||
|
||||
server_name {{ from }};
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
{% for realip in nginx.real_ip_from %}
|
||||
set_real_ip_from {{ realip }};
|
||||
{% endfor %}
|
||||
|
@ -72,6 +78,8 @@ server {
|
|||
# SSL common conf
|
||||
include "/etc/nginx/snippets/options-ssl.{{ site.ssl|default(nginx.default_ssl_domain) }}.conf";
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
{% for realip in nginx.real_ip_from %}
|
||||
set_real_ip_from {{ realip }};
|
||||
{% endfor %}
|
||||
|
|
|
@ -15,6 +15,8 @@ server {
|
|||
|
||||
server_name {{ site.from }};
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
{% for realip in nginx.real_ip_from %}
|
||||
set_real_ip_from {{ realip }};
|
||||
{% endfor %}
|
||||
|
@ -39,6 +41,8 @@ server {
|
|||
access_log /var/log/nginx/{{ site.from }}.log;
|
||||
error_log /var/log/nginx/{{ site.from }}_error.log;
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
# Keep the TCP connection open a bit for faster browsing
|
||||
keepalive_timeout 70;
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ server {
|
|||
|
||||
server_name {{ from }};
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
{% for realip in nginx.real_ip_from %}
|
||||
set_real_ip_from {{ realip }};
|
||||
{% endfor %}
|
||||
|
@ -29,6 +31,8 @@ server {
|
|||
|
||||
server_name {{ from }};
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
# SSL common conf
|
||||
include "/etc/nginx/snippets/options-ssl.{{ site.ssl|default(nginx.default_ssl_domain) }}.conf";
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ upstream {{ upstream.name }} {
|
|||
server {
|
||||
listen 443 default_server ssl;
|
||||
listen [::]:443 default_server ssl;
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
include "/etc/nginx/snippets/options-ssl.{{ nginx.default_ssl_domain }}.conf";
|
||||
|
||||
server_name _;
|
||||
|
@ -50,6 +53,8 @@ server {
|
|||
# Hide Nginx version
|
||||
server_tokens off;
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
{% for realip in nginx.real_ip_from %}
|
||||
set_real_ip_from {{ realip }};
|
||||
{% endfor %}
|
||||
|
@ -71,6 +76,8 @@ server {
|
|||
server_name {{ server.server_name|join(" ") }};
|
||||
charset utf-8;
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
# Hide Nginx version
|
||||
server_tokens off;
|
||||
|
||||
|
@ -98,6 +105,8 @@ server {
|
|||
server_name {{ server.server_name|join(" ") }};
|
||||
charset utf-8;
|
||||
|
||||
include "/etc/nginx/snippets/syslog.conf";
|
||||
|
||||
# Hide Nginx version
|
||||
server_tokens off;
|
||||
|
||||
|
|
4
roles/nginx/templates/nginx/snippets/syslog.conf.j2
Normal file
4
roles/nginx/templates/nginx/snippets/syslog.conf.j2
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
access_log syslog:server=unix:/dev/log,tag=nginx,nohostname,severity=info extended;
|
||||
error_log syslog:server=unix:/dev/log,tag=nginx,nohostname,severity=error;
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/tail +14
|
||||
{{ ansible_managed | comment }}
|
||||
[0m> [38;5;82mNGINX[0m a été déployé sur cette machine. Voir [38;5;6m/etc/nginx/[0m.
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
- name: Install nullmailer
|
||||
apt:
|
||||
update_cache: true
|
||||
name:
|
||||
- nullmailer
|
||||
- bsd-mailx
|
||||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
|
||||
- name: Set nullmailer remotes
|
||||
copy:
|
||||
content: "{{ nullmailer.smtp_server }} smtp\n"
|
||||
dest: /etc/nullmailer/remotes
|
||||
mode: 0644
|
||||
|
||||
- name: Set nullmailer adminaddr
|
||||
copy:
|
||||
content: "{{ nullmailer.root }}\n"
|
||||
dest: /etc/nullmailer/adminaddr
|
||||
mode: 0644
|
||||
|
||||
- name: Set nullmailer defaulthost
|
||||
copy:
|
||||
content: "{{ nullmailer.defaulthost }}\n"
|
||||
dest: /etc/nullmailer/defaulthost
|
||||
mode: 0644
|
||||
|
||||
- name: Set nullmailer allmailfrom
|
||||
copy:
|
||||
content: "{{ nullmailer.allmailfrom }}\n"
|
||||
dest: /etc/nullmailer/allmailfrom
|
||||
mode: 0644
|
4
roles/openssh_server/defaults/main.yml
Normal file
4
roles/openssh_server/defaults/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
openssh_authorized_principals:
|
||||
- any
|
||||
...
|
6
roles/openssh_server/handlers/main.yml
Normal file
6
roles/openssh_server/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Restart sshd
|
||||
systemd:
|
||||
name: ssh.service
|
||||
state: restarted
|
||||
...
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue