2020-10-17 00:21:57 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
2020-10-17 01:00:06 -05:00
|
|
|
---
|
2020-10-17 18:06:35 -05:00
|
|
|
# Preambulatory system configuration
|
2020-10-17 00:21:57 -05:00
|
|
|
- hosts: all
|
|
|
|
roles:
|
|
|
|
- role: common
|
2020-11-08 00:05:48 -06:00
|
|
|
become: yes
|
2020-10-17 01:00:06 -05:00
|
|
|
tags: [ common ]
|
|
|
|
- role: ansible-pull
|
2020-11-08 00:05:48 -06:00
|
|
|
become: yes
|
2020-10-17 01:00:06 -05:00
|
|
|
tags: [ ansible, common ]
|
2020-11-03 05:30:19 -06:00
|
|
|
# Home desktops
|
|
|
|
- hosts: desktop
|
2020-11-29 02:30:36 -06:00
|
|
|
tasks:
|
|
|
|
- name: give python3 cap_sys_ptrace
|
|
|
|
capabilities:
|
|
|
|
path: /usr/bin/python3.8
|
|
|
|
# Required for Randovania to access Dolphin memory
|
|
|
|
capability: cap_sys_ptrace+eip
|
2020-12-03 01:31:47 -06:00
|
|
|
become: yes
|
2020-11-03 05:30:19 -06:00
|
|
|
roles:
|
2020-11-08 06:10:12 -06:00
|
|
|
- role: desktop
|
|
|
|
become: yes
|
|
|
|
tags: [ desktop ]
|
2020-11-03 05:30:19 -06:00
|
|
|
- role: grub
|
|
|
|
become: yes
|
|
|
|
tags: [ desktop, grub ]
|
|
|
|
- role: udev
|
|
|
|
vars:
|
|
|
|
udev_rules:
|
|
|
|
# Switch RCM stuff
|
|
|
|
- SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="plugdev"
|
|
|
|
become: yes
|
|
|
|
tags: [ desktop, udev ]
|
2020-11-08 01:34:05 -06:00
|
|
|
- role: zerotier
|
|
|
|
become: yes
|
|
|
|
tags: [ desktop, zerotier ]
|
2020-10-17 18:06:35 -05:00
|
|
|
# Database servers
|
2020-11-08 08:16:07 -06:00
|
|
|
- hosts: psql1.desu.ltd
|
2020-10-17 18:06:35 -05:00
|
|
|
roles:
|
2020-10-29 21:02:02 -05:00
|
|
|
- role: postgresql
|
2020-10-28 21:56:12 -05:00
|
|
|
vars:
|
2020-10-29 20:39:59 -05:00
|
|
|
postgresql_global_config_options:
|
|
|
|
- option: listen_addresses
|
2020-11-08 08:16:07 -06:00
|
|
|
value: 192.168.164.156
|
2020-10-28 21:56:12 -05:00
|
|
|
postgresql_hba_entries:
|
2020-10-29 20:39:59 -05:00
|
|
|
- { type: local, database: all, user: postgres, auth_method: peer }
|
|
|
|
- { type: local, database: all, user: all, auth_method: peer }
|
|
|
|
- { type: host, database: all, user: all, address: '127.0.0.1/32', auth_method: md5 }
|
|
|
|
- { type: host, database: all, user: all, address: '::1/128', auth_method: md5 }
|
2020-11-08 08:16:07 -06:00
|
|
|
# Used for internal access from other nodes
|
2020-10-28 21:56:12 -05:00
|
|
|
- { type: host, database: all, user: all, address: '192.168.0.0/16', auth_method: md5 }
|
2020-10-29 20:39:59 -05:00
|
|
|
postgresql_users:
|
|
|
|
- name: gitea
|
|
|
|
password: "{{ secret_gitea_db_pass }}"
|
2020-11-01 04:55:05 -06:00
|
|
|
- name: nextcloud
|
|
|
|
password: "{{ secret_nextcloud_db_pass }}"
|
2020-10-29 20:39:59 -05:00
|
|
|
postgresql_databases:
|
|
|
|
- name: gitea
|
|
|
|
owner: gitea
|
2020-11-01 04:55:05 -06:00
|
|
|
- name: nextcloud
|
|
|
|
owner: nextcloud
|
2020-10-28 21:56:12 -05:00
|
|
|
become: yes
|
2020-10-17 18:06:35 -05:00
|
|
|
tags: [ db, psql ]
|
|
|
|
# Webservers
|
2020-11-08 08:16:07 -06:00
|
|
|
|
|
|
|
# NOTE: This whole stanza has been commented out pending resolution of https://github.com/ansible/ansible/issues/71528
|
|
|
|
# Currently, no release packages this fix. I NEED that fix out to work around this bug in 20.04
|
|
|
|
|
|
|
|
#- hosts: web1.desu.ltd
|
|
|
|
# roles:
|
|
|
|
# - role: certbot
|
|
|
|
# vars:
|
|
|
|
# certbot_admin_email: rehashedsalt@cock.li
|
|
|
|
# certbot_create_if_missing: yes
|
|
|
|
# certbot_create_method: standalone
|
|
|
|
# certbot_create_standalone_stop_services:
|
|
|
|
# - apache2
|
|
|
|
# certbot_certs:
|
|
|
|
# - domains:
|
|
|
|
# - desu.ltd
|
|
|
|
# - git.desu.ltd
|
|
|
|
# - nc.desu.ltd
|
|
|
|
# - web1.desu.ltd
|
|
|
|
# become: yes
|
|
|
|
# tags: [ web, certbot ]
|
|
|
|
# - role: apache
|
|
|
|
# vars:
|
|
|
|
# apache_remove_default_vhost: yes
|
|
|
|
# apache_packages_state: latest
|
|
|
|
# apache_mods_enabled:
|
|
|
|
# - ssl.load
|
|
|
|
# - proxy.load
|
|
|
|
# - proxy_http.load
|
|
|
|
# - rewrite.load
|
|
|
|
# apache_vhosts:
|
|
|
|
# - servername: git.test.desu.ltd
|
|
|
|
# extra_parameters: |
|
|
|
|
# ProxyPreserveHost On
|
|
|
|
# ProxyRequests Off
|
|
|
|
# ProxyPass / http://127.0.0.1:3000/ nocanon retry=1
|
|
|
|
# - servername: nc.test.desu.ltd
|
|
|
|
# documentroot: /var/www/html/nextcloud
|
|
|
|
# - servername: test.desu.ltd
|
|
|
|
# documentroot: /var/www/html/desu.ltd
|
|
|
|
# become: yes
|
|
|
|
# tags: [ web, apache ]
|
|
|
|
# - role: php
|
|
|
|
# vars:
|
|
|
|
# php_memory_limit: 512M
|
|
|
|
# php_packages_extra:
|
|
|
|
# - libapache2-mod-php
|
|
|
|
# - php-zip # For Nextcloud
|
|
|
|
# - php-intl
|
|
|
|
# - php-imagick
|
|
|
|
# - php-redis
|
|
|
|
# - php-bcmath
|
|
|
|
# - php-gmp
|
|
|
|
# - php-pgsql # For general DB stuff
|
|
|
|
# # Nextcloud recommended opcache settings
|
|
|
|
# php_opcache_max_accelerated_files: 10000
|
|
|
|
# php_opcache_memory_consumption: 128
|
|
|
|
# php_opcache_revalidate_freq: 2
|
|
|
|
# become: yes
|
|
|
|
# tags: [ web, php ]
|
|
|
|
# - role: git
|
|
|
|
# vars:
|
|
|
|
# git_repos:
|
|
|
|
# - repo: https://git.9iron.club/salt/desultd
|
|
|
|
# dest: /var/www/html/desu.ltd
|
|
|
|
# become: yes
|
|
|
|
# tags: [ web, git ]
|
|
|
|
# - role: nextcloud
|
|
|
|
# vars:
|
|
|
|
# nextcloud_admin_user: admin
|
|
|
|
# nextcloud_admin_pass: foobar
|
|
|
|
# nextcloud_version: 19
|
|
|
|
# nextcloud_urls:
|
|
|
|
# - http://nc.test.desu.ltd:80
|
|
|
|
# nextcloud_config:
|
|
|
|
# system:
|
|
|
|
# trusted_domains:
|
|
|
|
# "{{ nextcloud_urls | map('urlsplit', 'hostname') | list }}"
|
|
|
|
# nextcloud_database:
|
|
|
|
# backend: pgsql
|
|
|
|
# name: nextcloud
|
|
|
|
# user: nextcloud
|
|
|
|
# pass: "{{ secret_nextcloud_db_pass }}"
|
|
|
|
# host: 192.168.122.169
|
|
|
|
# port: 5432
|
|
|
|
# become: yes
|
|
|
|
# tags: [ web, nextcloud ]
|
|
|
|
# - role: gitea
|
|
|
|
# vars:
|
|
|
|
# # Look and feel
|
|
|
|
# gitea_app_name: "Git Desu"
|
|
|
|
# # Core config
|
|
|
|
# gitea_db_type: postgres
|
|
|
|
# gitea_db_host: 192.168.122.169:5432
|
|
|
|
# gitea_db_name: gitea
|
|
|
|
# gitea_db_user: gitea
|
|
|
|
# gitea_db_password: "{{ secret_gitea_db_pass }}"
|
|
|
|
# gitea_http_domain: git.test.desu.ltd
|
|
|
|
# gitea_oauth2_enabled: no
|
|
|
|
# gitea_root_url: http://git.test.desu.ltd
|
|
|
|
# gitea_shell: "/bin/bash"
|
|
|
|
# gitea_ssh_domain: git.test.desu.ltd
|
|
|
|
# gitea_ssh_port: 22
|
|
|
|
# gitea_start_ssh: no
|
|
|
|
# gitea_user: git
|
|
|
|
# become: yes
|
|
|
|
# tags: [ web, gitea ]
|