Remove unnecessary use of become
from some roles
This should make execution much faster
This commit is contained in:
parent
25cd394f08
commit
d5a7a61171
68 changed files with 11 additions and 243 deletions
|
@ -5,6 +5,7 @@ retry_files_enabled = False
|
|||
roles_path = $PWD/galaxy_roles:$PWD/roles
|
||||
collections_path = $PWD/galaxy_collections
|
||||
inventory = ./hosts
|
||||
become = True
|
||||
become_ask_pass = True
|
||||
interpreter_python = auto_silent
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
- hosts: casey
|
||||
roles:
|
||||
- nginx
|
||||
- role: geerlingguy.certbot
|
||||
become: true
|
||||
- geerlingguy.certbot
|
||||
- gateway
|
||||
- headscale
|
||||
- restic
|
||||
|
@ -25,7 +24,6 @@
|
|||
- tang
|
||||
roles:
|
||||
- role: geerlingguy.ntp
|
||||
become: true
|
||||
vars:
|
||||
ntp_timezone: "{{ timezone }}"
|
||||
ntp_manage_config: true
|
||||
|
@ -37,8 +35,7 @@
|
|||
- renovate
|
||||
- gitea-runner
|
||||
roles:
|
||||
- role: geerlingguy.docker
|
||||
become: true
|
||||
- geerlingguy.docker
|
||||
- docker_cleanup
|
||||
|
||||
- hosts:
|
||||
|
@ -75,13 +72,10 @@
|
|||
|
||||
- hosts: pve
|
||||
roles:
|
||||
- role: ironicbadger.proxmox_nag_removal
|
||||
become: true
|
||||
- ironicbadger.proxmox_nag_removal
|
||||
- zfs
|
||||
- role: ironicbadger.snapraid
|
||||
become: true
|
||||
- role: prometheus.prometheus.node_exporter
|
||||
become: true
|
||||
- ironicbadger.snapraid
|
||||
- prometheus.prometheus.node_exporter
|
||||
|
||||
- hosts: forrest
|
||||
roles:
|
||||
|
@ -98,8 +92,7 @@
|
|||
- hosts: walker
|
||||
roles:
|
||||
- nginx
|
||||
- role: geerlingguy.certbot
|
||||
become: true
|
||||
- geerlingguy.certbot
|
||||
- coredns_docker_proxy
|
||||
- plausible
|
||||
- restic
|
||||
|
@ -128,6 +121,5 @@
|
|||
- hosts: tang
|
||||
roles:
|
||||
- adguardhome
|
||||
- role: prometheus.prometheus.node_exporter
|
||||
become: true
|
||||
- prometheus.prometheus.node_exporter
|
||||
- restic
|
||||
|
|
|
@ -3,11 +3,9 @@
|
|||
name: coredns
|
||||
state: restarted
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: restart systemd-resolved
|
||||
service:
|
||||
name: systemd-resolved
|
||||
state: restarted
|
||||
enabled: true
|
||||
become: true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Install adguardhome
|
||||
kewlfft.aur.aur:
|
||||
name: adguardhome-bin
|
||||
become: true
|
||||
|
||||
- name: Disable resolved stub
|
||||
template:
|
||||
|
@ -10,7 +9,6 @@
|
|||
owner: root
|
||||
mode: "0644"
|
||||
notify: restart systemd-resolved
|
||||
become: true
|
||||
|
||||
- name: Use resolved resolv.conf
|
||||
file:
|
||||
|
@ -18,12 +16,10 @@
|
|||
dest: /etc/resolv.conf
|
||||
state: link
|
||||
notify: restart systemd-resolved
|
||||
become: true
|
||||
|
||||
- name: Install coredns
|
||||
kewlfft.aur.aur:
|
||||
name: coredns
|
||||
become: true
|
||||
|
||||
- name: Install coredns config file
|
||||
template:
|
||||
|
@ -32,4 +28,3 @@
|
|||
owner: coredns
|
||||
mode: "0644"
|
||||
notify: restart coredns
|
||||
become: true
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -17,4 +16,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart authentik
|
||||
become: true
|
||||
|
|
|
@ -1,25 +1,21 @@
|
|||
- name: Install fail2ban
|
||||
package:
|
||||
name: fail2ban
|
||||
become: true
|
||||
|
||||
- name: Enable fail2ban
|
||||
service:
|
||||
name: fail2ban
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: fail2ban SSH jail
|
||||
template:
|
||||
src: files/ssh-jail.conf
|
||||
dest: /etc/fail2ban/jail.d/ssh.conf
|
||||
mode: "0600"
|
||||
become: true
|
||||
register: fail2ban_jail
|
||||
|
||||
- name: Restart fail2ban
|
||||
service:
|
||||
name: fail2ban
|
||||
state: restarted
|
||||
become: true
|
||||
when: fail2ban_jail.changed
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
- name: Install logrotate
|
||||
package:
|
||||
name: logrotate
|
||||
become: true
|
||||
|
||||
- name: Enable logrotate timer
|
||||
service:
|
||||
name: logrotate.timer
|
||||
enabled: true
|
||||
become: true
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
- name: logrotate fail2ban config
|
||||
|
@ -15,4 +13,3 @@
|
|||
src: files/fail2ban-logrotate
|
||||
dest: /etc/logrotate.d/fail2ban
|
||||
mode: "0600"
|
||||
become: true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Install Base Packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
become: true
|
||||
loop:
|
||||
- htop
|
||||
- neofetch
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
- name: Install OpenSSH for Debian
|
||||
package:
|
||||
name: openssh-server
|
||||
become: true
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Install OpenSSH for Arch
|
||||
package:
|
||||
name: openssh
|
||||
become: true
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
|
||||
- name: Define context
|
||||
|
@ -22,7 +20,6 @@
|
|||
validate: /usr/sbin/sshd -t -f %s
|
||||
backup: true
|
||||
mode: "644"
|
||||
become: true
|
||||
register: sshd_config
|
||||
|
||||
- name: Set up authorized keys
|
||||
|
@ -38,11 +35,9 @@
|
|||
service:
|
||||
name: sshd
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: Restart SSH Daemon
|
||||
service:
|
||||
name: sshd
|
||||
state: reloaded
|
||||
when: sshd_config.changed
|
||||
become: true
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
comment: "{{ me.name }}"
|
||||
shell: /bin/bash
|
||||
system: true
|
||||
become: true
|
||||
|
||||
- name: Give user sudo access
|
||||
user:
|
||||
name: "{{ me.user }}"
|
||||
groups: "{{ 'sudo' if ansible_os_family == 'Debian' else 'wheel' }}"
|
||||
append: true
|
||||
become: true
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -17,7 +16,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart comentario
|
||||
become: true
|
||||
|
||||
- name: Install secrets
|
||||
copy:
|
||||
|
@ -26,7 +24,6 @@
|
|||
mode: "600"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart comentario
|
||||
become: true
|
||||
|
||||
- name: Install nginx config
|
||||
template:
|
||||
|
@ -34,7 +31,6 @@
|
|||
dest: /etc/nginx/http.d/comentario.conf
|
||||
mode: "0644"
|
||||
notify: reload nginx
|
||||
become: true
|
||||
vars:
|
||||
server_name: comentario.theorangeone.net
|
||||
upstream: comentario-comentario-1.docker:80
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
docker_network:
|
||||
name: coredns
|
||||
internal: true
|
||||
become: true
|
||||
|
||||
- name: Create install directory
|
||||
file:
|
||||
|
@ -10,7 +9,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -20,4 +18,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart coredns
|
||||
become: true
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -14,4 +13,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart db-auto-backup
|
||||
become: true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Install docker-compose
|
||||
package:
|
||||
name: docker-compose
|
||||
become: true
|
||||
when: ansible_os_family != 'Debian'
|
||||
|
||||
- name: Install compose-switch
|
||||
|
@ -9,7 +8,6 @@
|
|||
url: "{{ docker_compose_url }}"
|
||||
dest: "{{ docker_compose_path }}"
|
||||
mode: "0755"
|
||||
become: true
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Create docker group
|
||||
|
@ -17,7 +15,6 @@
|
|||
name: "{{ docker_user.name }}"
|
||||
state: present
|
||||
gid: "{{ docker_user.id }}"
|
||||
become: true
|
||||
|
||||
- name: Create docker user
|
||||
user:
|
||||
|
@ -25,21 +22,18 @@
|
|||
uid: "{{ docker_user.id }}"
|
||||
group: "{{ docker_user.name }}"
|
||||
create_home: false
|
||||
become: true
|
||||
|
||||
- name: Add user to docker user group
|
||||
user:
|
||||
name: "{{ me.user }}"
|
||||
groups: "{{ docker_user.name }}"
|
||||
append: true
|
||||
become: true
|
||||
|
||||
- name: Add user to docker group
|
||||
user:
|
||||
name: "{{ me.user }}"
|
||||
groups: docker
|
||||
append: true
|
||||
become: true
|
||||
|
||||
- name: Clean up docker containers
|
||||
cron:
|
||||
|
@ -47,6 +41,7 @@
|
|||
hour: 1
|
||||
minute: 0
|
||||
job: docker system prune -af --volumes
|
||||
user: "{{ docker_user.name }}"
|
||||
|
||||
- name: Install util scripts
|
||||
copy:
|
||||
|
@ -54,6 +49,7 @@
|
|||
dest: "{{ me.home }}"
|
||||
mode: "755"
|
||||
directory_mode: "755"
|
||||
owner: "{{ me.user }}"
|
||||
|
||||
- name: override docker service for zfs dependencies
|
||||
include_tasks: zfs-override.yml
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
path: /etc/systemd/system/docker.service.d
|
||||
state: directory
|
||||
mode: "0755"
|
||||
become: true
|
||||
|
||||
- name: Create override.conf
|
||||
copy:
|
||||
|
@ -12,4 +11,3 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
become: true
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -17,7 +16,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart gitea
|
||||
become: true
|
||||
|
||||
- name: Install config file
|
||||
template:
|
||||
|
@ -26,7 +24,6 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart gitea
|
||||
become: true
|
||||
|
||||
- name: Create custom templates directory
|
||||
file:
|
||||
|
@ -35,7 +32,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
recurse: true
|
||||
become: true
|
||||
|
||||
- name: Install custom footer
|
||||
copy:
|
||||
|
@ -44,4 +40,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
notify: restart gitea
|
||||
become: true
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install config file
|
||||
template:
|
||||
|
@ -13,7 +12,6 @@
|
|||
mode: "600"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart forgejo-runner
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -23,4 +21,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart forgejo-runner
|
||||
become: true
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
src: files/nginx-fail2ban-filter.conf
|
||||
dest: /etc/fail2ban/filter.d/nginx-tcp.conf
|
||||
mode: "0600"
|
||||
become: true
|
||||
register: fail2ban_filter
|
||||
|
||||
- name: fail2ban jail
|
||||
|
@ -11,12 +10,10 @@
|
|||
src: files/nginx-fail2ban-jail.conf
|
||||
dest: /etc/fail2ban/jail.d/nginx.conf
|
||||
mode: "0600"
|
||||
become: true
|
||||
register: fail2ban_jail
|
||||
|
||||
- name: Restart fail2ban
|
||||
service:
|
||||
name: fail2ban
|
||||
state: restarted
|
||||
become: true
|
||||
when: fail2ban_filter.changed or fail2ban_jail.changed
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
src: files/nginx.conf
|
||||
dest: /etc/nginx/stream.d/gateway.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
register: nginx_config
|
||||
|
||||
- name: Install CDN config
|
||||
|
@ -11,12 +10,10 @@
|
|||
src: files/nginx-cdn.conf
|
||||
dest: /etc/nginx/http.d/cdn.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
register: nginx_config
|
||||
|
||||
- name: Reload Nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
become: true
|
||||
when: nginx_config.changed
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Install wireguard tools
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
become: true
|
||||
loop:
|
||||
- wireguard-tools
|
||||
- qrencode
|
||||
|
@ -12,21 +11,18 @@
|
|||
dest: /etc/wireguard/wg0.conf
|
||||
mode: "0600"
|
||||
backup: true
|
||||
become: true
|
||||
register: wireguard_conf
|
||||
|
||||
- name: Enable wireguard
|
||||
service:
|
||||
name: wg-quick@wg0
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: Restart wireguard
|
||||
service:
|
||||
name: wg-quick@wg0
|
||||
state: restarted
|
||||
when: wireguard_conf.changed
|
||||
become: true
|
||||
|
||||
- name: Create wireguard client directory
|
||||
file:
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
service:
|
||||
name: wg-quick@glinet
|
||||
state: restarted
|
||||
become: true
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
- name: Install wireguard tools
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
become: true
|
||||
loop:
|
||||
- wireguard-tools
|
||||
- qrencode
|
||||
|
@ -15,7 +14,6 @@
|
|||
dest: /etc/wireguard/glinet.conf
|
||||
mode: "0600"
|
||||
backup: true
|
||||
become: true
|
||||
notify: restart wireguard
|
||||
|
||||
- name: Wireguard client config
|
||||
|
@ -24,11 +22,9 @@
|
|||
dest: "{{ me.home }}/glinet-vpn.conf"
|
||||
mode: "0600"
|
||||
owner: "{{ me.user }}"
|
||||
become: true
|
||||
notify: restart wireguard
|
||||
|
||||
- name: Enable wireguard
|
||||
service:
|
||||
name: wg-quick@glinet
|
||||
enabled: true
|
||||
become: true
|
||||
|
|
|
@ -3,4 +3,3 @@
|
|||
name: headscale
|
||||
state: restarted
|
||||
enabled: true
|
||||
become: true
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
- name: Install Headscale
|
||||
package:
|
||||
name: headscale
|
||||
become: true
|
||||
|
||||
- name: Install headscale config file
|
||||
template:
|
||||
|
@ -13,7 +12,6 @@
|
|||
owner: headscale
|
||||
mode: "0600"
|
||||
notify: restart headscale
|
||||
become: true
|
||||
|
||||
- name: Install ACLs
|
||||
template:
|
||||
|
@ -22,12 +20,10 @@
|
|||
owner: headscale
|
||||
mode: "0600"
|
||||
notify: restart headscale
|
||||
become: true
|
||||
|
||||
- name: Install nginx config
|
||||
template:
|
||||
src: files/nginx.conf
|
||||
dest: /etc/nginx/http.d/headscale.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
notify: reload nginx
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
service:
|
||||
name: squid
|
||||
state: restarted
|
||||
become: true
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
- name: Install squid
|
||||
package:
|
||||
name: squid
|
||||
become: true
|
||||
|
||||
- name: Squid config
|
||||
template:
|
||||
src: files/squid.conf
|
||||
dest: /etc/squid/squid.conf
|
||||
mode: "0600"
|
||||
become: true
|
||||
notify: restart squid
|
||||
|
||||
- name: Enable squid
|
||||
service:
|
||||
name: squid
|
||||
enabled: true
|
||||
become: true
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
service:
|
||||
name: wg-quick@wg0
|
||||
state: restarted
|
||||
become: true
|
||||
|
||||
- name: reload nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
become: true
|
||||
|
||||
- name: reload nftables
|
||||
command:
|
||||
|
@ -16,4 +14,3 @@
|
|||
- nft
|
||||
- -f
|
||||
- /etc/nftables.conf
|
||||
become: true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Install nftables
|
||||
package:
|
||||
name: nftables
|
||||
become: true
|
||||
|
||||
- name: Copy firewall config
|
||||
template:
|
||||
|
@ -9,7 +8,6 @@
|
|||
dest: /etc/nftables.conf
|
||||
validate: nft -c -f %s
|
||||
mode: "644"
|
||||
become: true
|
||||
notify: reload nftables
|
||||
|
||||
- name: Enable nftables
|
||||
|
@ -17,4 +15,3 @@
|
|||
name: nftables
|
||||
enabled: true
|
||||
state: started
|
||||
become: true
|
||||
|
|
|
@ -3,5 +3,4 @@
|
|||
src: files/nginx.conf
|
||||
dest: /etc/nginx/stream.d/ingress.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
notify: reload nginx
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
- name: Install Wireguard
|
||||
package:
|
||||
name:
|
||||
- wireguard
|
||||
become: true
|
||||
name: wireguard
|
||||
|
||||
- name: Get wireguard credentials
|
||||
set_fact:
|
||||
|
@ -14,14 +12,12 @@
|
|||
dest: /etc/wireguard/wg0.conf
|
||||
mode: "0600"
|
||||
backup: true
|
||||
become: true
|
||||
notify: restart wireguard
|
||||
|
||||
- name: Enable wireguard
|
||||
service:
|
||||
name: wg-quick@wg0
|
||||
enabled: true
|
||||
become: true
|
||||
|
||||
- name: Enable p2p communication
|
||||
sysctl:
|
||||
|
@ -31,4 +27,3 @@
|
|||
state: present
|
||||
reload: true
|
||||
sysctl_file: /etc/sysctl.d/99-sysctl.conf
|
||||
become: true
|
||||
|
|
|
@ -2,23 +2,19 @@
|
|||
ansible.builtin.apt_key:
|
||||
url: https://repo.jellyfin.org/jellyfin_team.gpg.key
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Add Jellyfin repository
|
||||
apt_repository:
|
||||
repo: deb [arch=amd64] https://repo.jellyfin.org/debian {{ ansible_distribution_release }} main
|
||||
filename: jellyfin
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install jellyfin
|
||||
package:
|
||||
name: jellyfin
|
||||
become: true
|
||||
|
||||
- name: Set media dir permissions
|
||||
cron:
|
||||
name: Set media permissions
|
||||
special_time: daily
|
||||
job: chown -R jellyfin:jellyfin /mnt/media
|
||||
become: true
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -17,7 +16,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart mastodon
|
||||
become: true
|
||||
|
||||
- name: Install media cleanup script
|
||||
template:
|
||||
|
@ -25,7 +23,6 @@
|
|||
dest: /opt/mastodon/purge-media.sh
|
||||
mode: "0755"
|
||||
owner: "{{ docker_user.name }}"
|
||||
become: true
|
||||
|
||||
- name: Schedule media cleanup
|
||||
cron:
|
||||
|
@ -35,4 +32,3 @@
|
|||
weekday: 1
|
||||
job: /opt/mastodon/purge-media.sh
|
||||
user: "{{ me.user }}"
|
||||
become: true
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -17,4 +16,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart minio
|
||||
become: true
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
service:
|
||||
name: nginx
|
||||
state: reloaded
|
||||
become: true
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
- name: Install nginx
|
||||
package:
|
||||
name: nginx
|
||||
become: true
|
||||
|
||||
- name: Install nginx modules
|
||||
package:
|
||||
|
@ -11,7 +10,6 @@
|
|||
- libnginx-mod-http-brotli-filter
|
||||
- libnginx-mod-stream
|
||||
when: ansible_os_family != 'Archlinux'
|
||||
become: true
|
||||
|
||||
- name: Install nginx modules (on Arch)
|
||||
kewlfft.aur.aur:
|
||||
|
@ -20,12 +18,10 @@
|
|||
- nginx-mod-headers-more
|
||||
- nginx-mod-brotli
|
||||
when: ansible_os_family == 'Archlinux'
|
||||
become: true
|
||||
|
||||
- name: Generate Diffie-Hellman parameters
|
||||
community.crypto.openssl_dhparam:
|
||||
path: /etc/nginx/dhparams.pem
|
||||
become: true
|
||||
|
||||
- name: Create config directories
|
||||
file:
|
||||
|
@ -36,7 +32,6 @@
|
|||
- http.d
|
||||
- stream.d
|
||||
- includes
|
||||
become: true
|
||||
|
||||
- name: Copy config files
|
||||
template:
|
||||
|
@ -44,7 +39,6 @@
|
|||
dest: /etc/nginx/includes/{{ item | basename }}
|
||||
mode: "0644"
|
||||
with_fileglob: files/includes/*.conf
|
||||
become: true
|
||||
notify: reload nginx
|
||||
|
||||
- name: Install config
|
||||
|
@ -52,7 +46,6 @@
|
|||
src: files/nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
notify: reload nginx
|
||||
|
||||
- name: Install HTTPS redirect
|
||||
|
@ -60,6 +53,5 @@
|
|||
src: files/nginx-https-redirect.conf
|
||||
dest: /etc/nginx/http.d/https-redirect.conf
|
||||
mode: "0644"
|
||||
become: true
|
||||
notify: reload nginx
|
||||
when: nginx_https_redirect
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -17,4 +16,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart ntfy
|
||||
become: true
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
- name: Install Pacman utils
|
||||
package:
|
||||
name: pacman-contrib
|
||||
become: true
|
||||
|
||||
- name: Create hooks directory
|
||||
file:
|
||||
path: /etc/pacman.d/hooks/
|
||||
state: directory
|
||||
mode: "0755"
|
||||
become: true
|
||||
|
||||
- name: Install pacman hook
|
||||
template:
|
||||
src: files/paccache.hook
|
||||
dest: /etc/pacman.d/hooks/clean_package_cache.hook
|
||||
mode: "0644"
|
||||
become: true
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install clickhouse config
|
||||
template:
|
||||
|
@ -15,7 +14,6 @@
|
|||
dest: /opt/plausible/docker_related_config.xml
|
||||
mode: "0644"
|
||||
notify: restart plausible
|
||||
become: true
|
||||
|
||||
- name: Install clickhouse user config
|
||||
template:
|
||||
|
@ -23,7 +21,6 @@
|
|||
dest: /opt/plausible/docker_related_user_config.xml
|
||||
mode: "0644"
|
||||
notify: restart plausible
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -33,7 +30,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart plausible
|
||||
become: true
|
||||
|
||||
- name: Install nginx config
|
||||
template:
|
||||
|
@ -41,7 +37,6 @@
|
|||
dest: /etc/nginx/http.d/plausible.conf
|
||||
mode: "0644"
|
||||
notify: reload nginx
|
||||
become: true
|
||||
vars:
|
||||
server_name: plausible.theorangeone.net elbisualp.theorangeone.net
|
||||
upstream: plausible-plausible-1.docker:8000
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
|
@ -14,7 +13,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart privatebin
|
||||
become: true
|
||||
|
||||
- name: Install config file
|
||||
template:
|
||||
|
@ -23,4 +21,3 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart privatebin
|
||||
become: true
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install grafana compose file
|
||||
template:
|
||||
|
@ -18,4 +17,3 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart grafana
|
||||
become: true
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
- "{{ vps_hosts.private_ipv6_range }}"
|
||||
register: routes
|
||||
changed_when: false
|
||||
become: true
|
||||
|
||||
- name: Add route to private services via ingress
|
||||
command:
|
||||
|
@ -31,5 +30,4 @@
|
|||
- "{{ pve_hosts.ingress.ipv6 }}"
|
||||
- dev
|
||||
- eth0
|
||||
become: true
|
||||
when: vps_hosts.private_ipv6_marker not in routes.stdout
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install prometheus config
|
||||
template:
|
||||
|
@ -13,7 +12,6 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: reload prometheus
|
||||
become: true
|
||||
|
||||
- name: Install prometheus compose file
|
||||
template:
|
||||
|
@ -23,7 +21,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart prometheus
|
||||
become: true
|
||||
|
||||
- name: Install blackbox config
|
||||
template:
|
||||
|
@ -32,7 +29,6 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart prometheus
|
||||
become: true
|
||||
|
||||
- name: Install alertmanager config
|
||||
template:
|
||||
|
@ -41,7 +37,6 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart prometheus
|
||||
become: true
|
||||
|
||||
- name: Install prometheus alert rules
|
||||
copy:
|
||||
|
@ -50,4 +45,3 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: reload prometheus
|
||||
become: true
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install calibre compose file
|
||||
template:
|
||||
|
@ -14,7 +13,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: restart calibre
|
||||
shell:
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install librespeed compose file
|
||||
template:
|
||||
|
@ -17,7 +16,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: restart librespeed
|
||||
shell:
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install nextcloud compose file
|
||||
template:
|
||||
|
@ -17,7 +16,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: Install nextcloud config
|
||||
template:
|
||||
|
@ -26,7 +24,6 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
register: config_file
|
||||
become: true
|
||||
|
||||
- name: Install occ script
|
||||
template:
|
||||
|
@ -34,7 +31,6 @@
|
|||
dest: /opt/nextcloud/occ
|
||||
mode: "0755"
|
||||
owner: "{{ docker_user.name }}"
|
||||
become: true
|
||||
|
||||
- name: restart nextcloud
|
||||
shell:
|
||||
|
@ -47,4 +43,3 @@
|
|||
name: Set nextcloud data permissions
|
||||
special_time: daily
|
||||
job: chown -R {{ docker_user.name }}:{{ docker_user.name }} /mnt/tank/files/nextcloud
|
||||
become: true
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install quassel compose file
|
||||
template:
|
||||
|
@ -14,7 +13,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: restart quassel
|
||||
shell:
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install synapse compose file
|
||||
template:
|
||||
|
@ -17,7 +16,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: Install synapse config
|
||||
template:
|
||||
|
@ -26,7 +24,6 @@
|
|||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
register: homeserver_config
|
||||
become: true
|
||||
|
||||
- name: restart synapse
|
||||
shell:
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Create tt-rss plugins directory
|
||||
file:
|
||||
|
@ -13,7 +12,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
register: plugins_dir
|
||||
become: true
|
||||
|
||||
- name: Install tt-rss compose file
|
||||
template:
|
||||
|
@ -23,7 +21,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
register: compose_file
|
||||
become: true
|
||||
|
||||
- name: Install fever plugin
|
||||
git:
|
||||
|
@ -41,7 +38,6 @@
|
|||
owner: "{{ docker_user.name }}"
|
||||