Add mediaserver, rm .gitignore, FQCN, Jellyfin

- Added development "mediaserver" playbook for testing
- rm .gitignore in roles dir since no external ansible roles are used
- Update a part of the base role to use FQCN for linting
- Added "jellyfin" role to install Jellyfin with docker-compose
- Updated Traefik to use the loopback for default web entry points
- Simplified Traefik docker-compose vars, Ansible sets defaults
This commit is contained in:
2023-04-26 02:26:50 -04:00
parent 9512212b84
commit 81d2ea447a
15 changed files with 160 additions and 40 deletions

View File

@@ -1,18 +1,24 @@
- name: Reboot host
reboot:
ansible.builtin.reboot:
msg: "Reboot initiated by Ansible"
connect_timeout: 5
listen: reboot_host
when: allow_reboot
- name: Restart WireGuard
service:
ansible.builtin.service:
name: wg-quick@wg0
state: restarted
listen: restart_wireguard
- name: Restart Fail2ban
service:
ansible.builtin.service:
name: fail2ban
state: restarted
listen: restart_fail2ban
- name: Restart ddclient
ansible.builtin.service:
name: ddclient
state: restarted
listen: restart_ddclient

View File

@@ -1,11 +1,11 @@
- name: 'Install Ansible dependency: python3-apt'
shell: 'apt-get update && apt-get install python3-apt -y'
ansible.builtin.shell: 'apt-get update && apt-get install python3-apt -y'
args:
creates: /usr/lib/python3/dist-packages/apt
warn: false
- name: Install additional Ansible dependencies
apt:
ansible.builtin.apt:
name: "{{ item }}"
state: present
force_apt_get: true
@@ -17,7 +17,7 @@
- python3-psycopg2
- name: Create Ansible's temporary remote directory
file:
ansible.builtin.file:
path: "~/.ansible/tmp"
state: directory
mode: 0700

View File

@@ -1,22 +1,17 @@
- name: Install ddclient
apt:
ansible.builtin.apt:
name: ddclient
state: present
- name: Install ddclient settings
template:
ansible.builtin.template:
src: ddclient.conf.j2
dest: /etc/ddclient.conf
mode: 0600
register: ddclient_settings
- name: Start ddclient and enable on boot
service:
ansible.builtin.service:
name: ddclient
state: started
enabled: true
- name: Restart ddclient
service:
name: ddclient
state: restarted
when: ddclient_settings.changed