ansible/group_vars/all/main.yaml

303 lines
10 KiB
YAML
Raw Normal View History

2022-08-30 12:41:17 +00:00
---
ansible_python_interpreter: /usr/bin/python3
syslogfacility: LOG_LOCAL2
network_nameservers: "{{ dns_servers }}"
network_search: kill0.net
postfix_aliases:
postmaster: root
hostmaster: root
webmaster: root
abuse: root
administrator: root
admin: root
root: sysops@kill0.net
devnull: /dev/null
#firewall_ssh_whitelist:
# - "{{ lookup('dig', 'jump0.kill0.net/A') }}"
# - "{{ lookup('dig', 'jump0.kill0.net/AAAA') }}"
# - 192.168.255.17
# - 2600:3c00:e000:343::11/128
firewall_ipset_mgmt:
- "{{ lookup('dig', 'jump0.kill0.net/A') }}"
- "{{ lookup('dig', 'jump0.kill0.net/AAAA') }}"
firewall_limited_tcp_ports:
- 22
#unattended_upgrades_mailto: sysops@kill0.net
unattended_upgrades_mailto: devnull
unattended_upgrades_automatic_reboot: yes
unattended_upgrades_automatic_reboot_time: '8:00'
unattended_upgrades_reboot_with_users: no
openssh_sshd_config:
PermitRootLogin: prohibit-password
autossh_config:
- name: influx
host: jump0.kill0.net
options:
- -L 127.254.254.1:8086:127.0.0.1:8086
- name: syslog
host: jump0.kill0.net
options:
- -L 127.254.254.1:1514:127.0.0.1:514
user_authorized_keys_hash:
ryan:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGznaofIstAxYsX1MH8xQiZU4aOO4SUw9OlRbyFMfQTx
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKdWuh9fbKNubIWaYGwOcbGNkh1Osifh/22KE5pKlVxfVqTT2MiEY6LlvlqR0UkU0hos5F0aEigK7wsABy0KEP2Z0hlx1IwO89rX1TbeqbNVvFk34+jBFflNhBTwE4fekBc4WyvQ3MtlygUTqUnPiQNMBL6uV3rHfh015C5ZqRHSqT7O/+bIbuLSOLizQPph/EJ7U7ti5gfZb5J8uSLdaK0vCLSIokleht3dE1DxfNq4LaVcNCGfNXHIzhaew7L4IkJ7nSWGRtGD7a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kKcNv3h+hS7VGmZjsxU0+bwl0b3g6woKEuMjnD5MfCsKIs6TOB5XjoDw8PMC+BsOiafFPeXGL8UA4yBtdNXFk6B4Ev6lZflPvenJXXJjYeePnhXjPaI6cNjSPhByy8mPU0AzWhtq8akbXlOCUrjuq2XoatwVOd1ZWj344PHfav7zmZkYLWOE7AR++ng+4pNxrfeiCxBcgSluKNYkZFac04OX8PSNbvqTWA29GIDlmcomaSJOWslVoVOiWYQ+7wWIb0d2+RgH/6UvVS500NyacOSkSlfI8SyqC5VVb2jjUC+GQ2zW/IMfYlwRutXT3MRgVtuoQ2i/aXizPLsH6iBqKxQDMV48avTNIitN29owOBPpDNsd1o4iy4kdMPrAFmrPBYSA939nOUzPmCCwU=
users_interactive:
- name: ryan
groups:
- users
- sudo
- adm
comment: Ryan Cavicchioni
password: "{{ vault_user_password_hashes['ryan'] }}"
- name: rick
groups:
- users
comment: Rick Elias
password:
users_authorized_keys:
- name: ryan
keys: "{{ user_authorized_keys_hash['ryan'] }}"
- name: rick
keys: "{{ user_authorized_keys_hash['rick'] }}"
- name: root
keys: "{{ user_authorized_keys_hash['ryan'] }}"
telegraf_config_outputs:
influxdb:
urls:
- http://127.254.254.1:8086
telegraf_config_d:
- name: ping
config:
inputs.ping:
- urls:
- 10.255.0.1
count: 10
ipv6: false
binary: ping4
rsyslog_archival_format_enabled: true
rsyslog_outputs:
- name: omfwd
params:
#target: 127.254.254.1
target: 10.255.0.1
#port: 1514
port: 514
protocol: tcp
action.resumeretrycount: -1
queue.type: linkedlist
queue.size: 10000
queue.filename: fwd
queue.saveonshutdown: "on"
keepalive: "on"
sudo_aliases:
host:
- name: minecraft
items:
- mine[[\:digit\:]]*
- name: jumphosts
items:
- jump[[\:digit\:]]*
sudo_rules:
- name: "%sudo"
hosts: ALL
runas:
users: ALL
groups: ALL
tags:
- NOPASSWD
commands: ALL
restic_repos:
- name: b2
2022-08-31 03:36:26 +00:00
repo: "b2:kill0-infra-backup:/{{ inventory_hostname_short }}"
2022-08-30 12:41:17 +00:00
environment:
RESTIC_PASSWORD: "{{ vault_restic_repo_b2_password }}"
B2_ACCOUNT_ID: "{{ vault_restic_repo_b2_account_id }}"
B2_ACCOUNT_KEY: "{{ vault_restic_repo_b2_account_key }}"
restic_jobs:
- name: system
repo: b2
paths:
- /
certs_trusted_ca:
chill9-root-ca: |
subject=C = US, O = chill9, CN = chill9 Root CA
issuer=C = US, O = chill9, CN = chill9 Root CA
notBefore=May 16 17:36:20 2020 GMT
notAfter=May 14 17:36:20 2030 GMT
-----BEGIN CERTIFICATE-----
MIIFOjCCAyKgAwIBAgIQdRhWyOcUQ+uIEypQfJLvqTANBgkqhkiG9w0BAQsFADA3
MQswCQYDVQQGEwJVUzEPMA0GA1UECgwGY2hpbGw5MRcwFQYDVQQDDA5jaGlsbDkg
Um9vdCBDQTAeFw0yMDA1MTYxNzM2MjBaFw0zMDA1MTQxNzM2MjBaMDcxCzAJBgNV
BAYTAlVTMQ8wDQYDVQQKDAZjaGlsbDkxFzAVBgNVBAMMDmNoaWxsOSBSb290IENB
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAswTensn+vA45WGRp3o/5
LX+wh6PTHAGNluLaZRyUNOg+EunnXAvMBF912D587wLAiC1G9FGOn+8JVws2QITX
+U8Y8L2vhnfGQNCQYvqBfJc5PJt3ZZ35to5tdTRJTeVhNWzIA7qOZh8ualFbCDYd
m6K74SlfEbvKzS02pYWN6wCVXtGOPl7VoOtjg8cOUX6u1pZpBKQfzq3lgLS2oMp0
VuBJeUMiki/O8nCC10VCXcZ9q4bsUvWH9lJB/IqlKt+bG9TjO+vigb9eOSfaILkM
d7NMziP5OQXMjv6NwmJQY7N5TiKWdh9h4G3KS41dr2Oeo+A1FcMEP9nkZb1lX3Ft
9Xzw8jJ99SD36mCEiqndvKA66/pcgMCvPAkkDwoSS+Er4LPcNmY2TVN+mIaF1OaS
Dc1EAXUfjnX8mZlclS/AfCg8TIPCc8o6Neg3DECT2j+IC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ERTIFICATE-----
openvpn_config:
client:
client:
remote: vpn-jump0.kill0.net 1194
ca: "{{ openvpn_etc_path }}/client/ca.pem"
cert: "{{ openvpn_etc_path }}/client/cert.pem"
key: "{{ openvpn_etc_path }}/client/key.pem"
tls-auth: "{{ openvpn_etc_path }}/client/ta.key 1"
verb: 3
dev: tun
teleport_service_state: stopped
teleport_service_enabled: false
firewall_teleport_node_enabled: false
teleport_roles: [ node ]
teleport_config:
teleport:
auth_token: "{{ vault_teleport_static_token }}"
ca_pin: sha256:4ef484a5949aadedf983bc1f1d43f6f31356ca37f9608267424ddc0d9b68e010
auth_servers:
- "jump0.kill0.net:3025"
firewall_ipset_node_exporter:
- "{{ lookup('dig', 'jump0.kill0.net./A') }}"
- "{{ lookup('dig', 'jump0.kill0.net./AAAA') }}"
- 10.255.0.1
firewall_ipset_blackbox_exporter:
- "{{ lookup('dig', 'jump0.kill0.net./A') }}"
- "{{ lookup('dig', 'jump0.kill0.net./AAAA') }}"
- 10.255.0.1
firewall_ipset_mtail:
- "{{ lookup('dig', 'jump0.kill0.net./A') }}"
- "{{ lookup('dig', 'jump0.kill0.net./AAAA') }}"
- 10.255.0.1
node_exporter_du_directories:
- /var/log/syslog
- /var/spool/rsyslog
wireguard_iptables:
wg0:
input: true
wireguard_network_prefix: 10.255.0
wireguard_peers:
wg0:
- public_key: 1ipGUnK8XDbIoBIEF440BhwLUe0yHa5l3kZZc4eFxV8=
endpoint: "{{ lookup('dig', 'jump0.kill0.net./A') }}:{{ wireguard_port }}"
allowed_ips: "{{ hostvars['jump0.kill0.net'].wireguard_interfaces.wg0.address }}"
supervisor_unix_http_server_socket_chown: root:node_exporter
supervisor_unix_http_server_socket_chmod: "0770"
firewall_ipset_loki:
- 10.255.0.1
promtail_clients:
- url: http://10.255.0.1:3100/loki/api/v1/push
promtail_scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: syslog
__path__: "/var/log/syslog/{{ ansible_hostname }}/**/*.log"
- job_name: nginx
static_configs:
- targets:
- localhost
labels:
job: nginx
host: "{{ ansible_hostname }}"
__path__: /var/log/nginx/*.log
pipeline_stages:
- match:
selector: '{job="nginx"}'
stages:
- regex:
expression: '^(?P<remote_addr>[^ ]+) - (?P<remote_user>[^ ]*) \[(?P<time_local>.*)\] "(?P<method>[^ ]*) (?P<request>[^ ]*) (?P<protocol>[^ ]*)" (?P<status>[\d]+) (?P<body_bytes_sent>[\d]+) "(?P<http_referer>[^"]*)" "(?P<http_user_agent>[^"]*)"?'
- metrics:
nginx_requests_total:
type: Counter
description: requests in nginx access logs
source: method
config:
action: inc
- labels:
#remote_addr:
#remote_user:
#time_local:
method:
#request:
#protocol:
status:
body_bytes_sent:
#http_referer:
#http_user_agent:
loki_service_enabled: false
loki_service_state: stopped
promtail_service_enabled: false
promtail_service_state: stopped
influxdb_service_enabled: false
influxdb_service_state: stopped
influxdb_package_state: absent
telegraf_service_enabled: false
telegraf_service_state: stopped
telegraf_package_state: absent