feat: fixes, +prowlarr +watchtower -jackett

This commit is contained in:
2023-02-17 16:15:32 +01:00
parent 8ef78becc0
commit dd196364cc
31882 changed files with 197 additions and 6173244 deletions

38
roles/common/README.md Normal file
View File

@@ -0,0 +1,38 @@
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).

View File

@@ -0,0 +1,3 @@
---
# leer
...

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC0dCYmmRwBGoH1bB3VvYqZOb24EKmSJaNAnDgUusbTCgXlhf1LPDirJS2rJrWaEs4alybChpFPKscvHf6ka2nFN1avWGcXitnSiPzIiBZqmOyL34aqwEIxnDNesw3M18WsySMQDQ8HR+PboQ9SQnxEW2oHukDoxEyeE6xts5mKv5ri69bTBVmvD1F8VNATDR9irjht2zDN0MMp2A6zPwCT5qH+H8Xl6p7nPxq8hsKrTuV5PaAQ0SZWFIczzlgqiDA595KoSFuOV5c0s8nAKjz55YJneo8hfxZ6AEx1/QQPWkTuYiW8xB1O6m6RRq+lMtT6NocI+S9pQWwZNU2ipvxa+EsC5MjMR/NFmef65Ak1ic4GjQwkNmDCxmEeFAtH/oLFtANsEK05y0jx/KKeLB07tQWboqTR9wJz/QmZv3yLZThg2eCi8MO1zxXDmqIAT0XPSwiivyWcki4To9G6EOPcXOLXd4Ap5LcC7qWJHiQ70ddgj+pNv5aLfzuZdh7+5jM= ansible@LB-DSFS026406

View File

@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDE16YLmHW4TkwvGdXP8kHtQYzLSa9A9FxccOe6tCUF+Qyb34Jkk7Rw/oJvMrTPMyBUkeQDIML/UuGFCzb6Zh6NA76zbd1uKlenAgEyzck+MNHgzExECIJoWpqEZf1xYaJoigQ38ct/sepvdHuADFMSfiS/syES2bUT/H7JF5rDMrGEmzZjeisPcLx8+e8BK5wY8st9HaBbTR/ngqpqKQwVjKoZgIH8ozVWg6OnIdRjbDD//teYcRe+VlZ2MMr4hfb80EJw3PjZMjA3PUb6cwWqpgpzAtMB6jKf5H1fzgEwGOFHwuv3Zs6mDwD0qK2xPTrsXYQmqqnKyeOdxb4VPRBGcO1WgoliqYgZCy74WzKr4L/y7Z+6xsdOB60WVQrtCflxnz9wdh/pgNlEVULMRKXe3TKxtVdxcCECSe5e3YVaZ4BMvAHwkUCbVWb4Ny2GmPKjUHAkA3dzdmUhtAR7IT1VFiS1s1Lzf/xf6asazw4qYM7CfJOn8yu7bxmYjEnywzUrg7jga5/5xLS74QnNeTuVoMdVjK1y42LAOrrRyXCO0w8WtMyPTZvTUWkHNQ9Jqdiw6/K9Ai+9iTl2P55pAWogDGLvywk7PGH6+vNyGii6xEHPbR1/tgMVgrMDnbgtrDH2kMPcCinH5M6eb1lGG45KBOGY7zEFBQDDtwGkkMQUFQ== martin@martin-NUC10

View File

@@ -0,0 +1,2 @@
---
# handlers file for common

View File

@@ -0,0 +1,52 @@
galaxy_info:
author: your name
description: your role description
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.1
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

View File

@@ -0,0 +1,54 @@
---
- name: Create default groups
group:
name: "{{ item }}"
state: present
loop:
- docker
- ansible
- name: Create default user
user:
name: "martin"
uid: "1000"
groups: docker,ansible
append: yes
shell: /bin/bash
state: present
- name: Create appusers
user:
name: "{{ item }}"
shell: /bin/bash
state: present
loop:
- "{{ appusers }}"
- name: create root authorized_keys
template:
src: root_authorized_keys.j2
dest: /root/.ssh/authorized_keys
owner: root
mode: '0600'
#- name: Create user authorized_keys
# authorized_key:
# user: "{{ item }}"
# key: "{{ item }}_rsa.pub"
# loop:
# - '{{ keys }}'
- name: apt update && apt upgrade
apt:
name: "*"
state: latest
update_cache: true
- name: Install default packages
apt:
name: "{{ item }}"
state: present
loop:
- "{{ default_pkgs }}"
...

View File

@@ -0,0 +1,5 @@
{% for user in keys %}
{% if keys[user].ssh_as_root | default(false) %}
{{ keys[user].pub_key }}
{% endif %}
{% endfor %}

View File

@@ -0,0 +1,3 @@
{% for user in users %}
{{ keys[user].pub_key }}
{% endfor %}

View File

@@ -0,0 +1,2 @@
localhost

View File

@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- common

View File

@@ -0,0 +1,23 @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zlgqiDA595KoSFuOV5c0s8nAKjz55YJneo8hfxZ6AEx1/QQPWkTuYiW8xB1O6m6RRq+lMtT6NocI+S9pQWwZNU2ipvxa+EsC5MjMR/NFmef65Ak1ic4GjQwkNmDCxmEeFAtH/oLFtANsEK05y0jx/KKeLB07tQWboqTR9wJz/QmZv3yLZThg2eCi8MO1zxXDmqIAT0XPSwiivyWcki4To9G6EOPcXOLXd4Ap5LcC7qWJHiQ70ddgj+pNv5aLfzuZdh7+5jM= ansible@LB-DSFS026406"
default_pkgs:
- curl
- git
- net-tools
- nfs-common
- nmap
- screen
- tar
- zip
- unzip
...

View File

@@ -69,11 +69,11 @@ sections:
icon: https://deluge-torrent.org/images/deluge-icon.png
url: http://192.168.178.200:8112
id: 2_1143_deluge
- title: jackett
- title: prowlarr
icon: favicon
url: http://192.168.178.200:9117/UI/Dashboard
url: http://192.168.178.200:9696
target: newtab
statusCheckUrl: http://192.168.178.200:9117/favicon.ico
statusCheckUrl: http://192.168.178.200:9696/favicon.ico
id: 3_1143_jackett
- title: Jellyfin
icon: https://jellyfin.org/favicon.ico

View File

@@ -1,2 +1,9 @@
---
# handlers file for mediaserver
- name: restart docker-compose
community.docker.docker_compose:
project_src: /opt/docker/mediaserver
remove_orphans: true
pull: true
state: present
restarted: true

View File

@@ -1,4 +1,26 @@
---
- name: Create nfs mounts
become: true
lineinfile:
path: /etc/fstab
line: "{{ item }}"
state: present
loop: "{{ NFS_MOUNTS }}"
tags: setup, test
- name: Install mediaserver packages
apt:
name: "{{ item }}"
state: present
update_cache: true
loop:
- python3-docker
- name: Install pip docker-compose
pip:
name: docker-compose
state: present
- name: Create project dir
file:
state: directory
@@ -13,6 +35,7 @@
unarchive:
src: ovpn.tar.gz
dest: /opt/docker/mediaserver/config/openvpn
notify: restart docker-compose
tags: setup, delugevpn
- name: Create dashy config folder
@@ -25,6 +48,7 @@
copy:
src: dashy_config.yml
dest: /opt/docker/mediaserver/dashy_config/config.yml
notify: restart docker-compose
tags: setup, dashy
- name: Place docker-compose.yaml
@@ -34,6 +58,7 @@
#owner: 1000
#group: 1000
#mode: '0755'
notify: restart docker-compose
tags: setup
- name: Start mediaserver
@@ -42,3 +67,4 @@
state: present
pull: true
...

View File

@@ -32,7 +32,7 @@ services:
- UMASK=000
- PUID=0
- PGID=0
image: binhex/arch-delugevpn
image: binhex/arch-delugevpn:2.1.1-1-01
restart: unless-stopped
# sonarr:
@@ -98,21 +98,6 @@ services:
retries: 3
start_period: 40s
jackett:
image: lscr.io/linuxserver/jackett
container_name: jackett
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- AUTO_UPDATE=true #optional
volumes:
- ./jackett_config:/config
- ./jackett_blackhole:/downloads
ports:
- 9117:9117
restart: unless-stopped
jellyfin:
image: lscr.io/linuxserver/jellyfin
container_name: jellyfin
@@ -162,6 +147,29 @@ services:
- 6767:6767
restart: unless-stopped
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:
- ./prowlar_config:/config
ports:
- 9696:9696
restart: unless-stopped
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_SCHEDULE="0 0 4 * * *"
- WATCHTOWER_CLEANUP="true"
- TZ="Europe/Berlin"
restart: unless-stopped
# readarr:
# image: lscr.io/linuxserver/readarr:develop
# container_name: readarr

View File

@@ -1,8 +1,26 @@
$ANSIBLE_VAULT;1.1;AES256
36313835396234393030646163373635353061386564363566353165616133303033613735626561
3138633036396130663266333234653431383536666137370a333838663833366334396436306432
31633932623466336439366639653435623564613730396464656430376262336237356139366437
6562373233376339390a323530393537656466313731356234663562336235326565636234363732
33373233613939346466323062303162653230623138313062633031333066386435653133333361
66356239333832613633663033383836656430623733353564663534623261373461616566646533
656233653866623635353965343237313433
35633363316132666635656236316665663235336530323065396632636536386135616264373863
3932373362336332396330653661626432346164623537390a656565633461373731366236313234
62363136363133353737386562396330326662326135363533343864323931326139376230373262
6462323031343330360a613635306539626136666235656437303036303430366564326437303038
35363830343362643030346565336264346139306161646332363436306462336362303362623465
37303339653339323531613230613635353066386432383561633362653638636365303137306136
37396239626635363830613130376265386339643466623437653734353035646332356464386136
66666135663233383234333237346164386134303466646661356539376663656133323531643337
33363563343138366563396362636465616631366635353639666131353030613338336162303261
61303264616236346165333033383763353030326361666530636636353963663266346633663664
36656662333363646664316263346538356631366565363662633937393539626535356530303732
38666430656635393338613334353562326631326663613339653034626233663966333636363438
65616464646463336666306263636437343231613765646637303264303632303831303434373161
62326135646532653133393063663434633834346239316261313831333630306661643035666231
38623239333437363231323465343633303833313438396562663162373764636662356234336638
62343065393831613739386532386635613430626239653432666434323939393562313462336364
35323164376662333239333666383134336539396434393263396137346639373630373839613436
62653933396239653965306432653837326235356365366563393963633133613261386235663363
31613463393539643536323866633763353436343238646135636634653834366266333235656230
32373665656235643234306335613338343465363133626233353232653836323137643937636336
35613339636662363837333135626336396437356230303464373834643865636438356664346235
39623036653034663833623737326166373938313731336265626637383538616663396231306430
34356534613833616139386230313336376532353834343162386139363236666266326638623061
65643536346439666437643065353264643633653664623462616639653630323735383932626137
3363