style: make ansible-lint happy

This commit is contained in:
VC
2024-07-05 11:53:44 +02:00
parent 99cb02e92d
commit 4bbb789c77
13 changed files with 77 additions and 52 deletions

View File

@@ -3,7 +3,7 @@
- name: Create jackett user
ansible.builtin.user:
comment: jackett
home: "{{ jackett_home }}"
home: "{{ bittorrent_jackett_home }}"
name: jackett
password: '!'
shell: /bin/bash
@@ -11,7 +11,7 @@
- name: Unzip jackett
ansible.builtin.unarchive:
src: "{{ jackett_download_url }}"
src: "{{ bittorrent_jackett_download_url }}"
remote_src: true
dest: "/opt"
owner: jackett

View File

@@ -9,8 +9,8 @@ RestartSec=5
Type=simple
User=jackett
Group=jackett
WorkingDirectory={{ jackett_home }}
ExecStart=/bin/sh "{{ jackett_home }}/jackett_launcher.sh"
WorkingDirectory={{ bittorrent_jackett_home }}
ExecStart=/bin/sh "{{ bittorrent_jackett_home }}/jackett_launcher.sh"
TimeoutStopSec=30
[Install]

View File

@@ -1,5 +1,5 @@
---
jackett_version: "v0.21.1025"
jackett_download_url: "https://github.com/Jackett/Jackett/releases/download/{{ jackett_version }}/Jackett.Binaries.LinuxAMDx64.tar.gz"
jackett_home: "/opt/Jackett"
bittorrent_jackett_version: "v0.21.1025"
bittorrent_jackett_download_url: "https://github.com/Jackett/Jackett/releases/download/{{ bittorrent_jackett_version }}/Jackett.Binaries.LinuxAMDx64.tar.gz"
bittorrent_jackett_home: "/opt/Jackett"

View File

@@ -1,27 +1,27 @@
---
source_pass: !vault |
icecast2_source_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
36383738646636353839616365316537653865666335353136666166336137636635663062626265
6464633337633063326632303332623264336462383635360a336362623464623061666230366366
32366135323936386430333735666362303132623764646439316330666334333739306432616538
3836323434303637370a643864666439373934306439353030613266303139333732353138653238
6531
relay_pass: !vault |
icecast2_relay_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
61663166303239323862656262303332313365616132633765666264376234316630656330356333
6264646531643936616466653832656537316533303161630a393763303536356631666631393161
32393762366231386665633962613332333163323530313032343430383335643962336535366639
3366316330326363660a643664626461623833323531336134353233343235346631303765333066
6366
admin_pass: !vault |
icecast2_admin_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
62353032653634373261396231393539393530313639613730386163383933313863306561336164
3632663966353336353330356230373038623037663665380a393038633039326261353266633331
63383237636536663036346335613933356161346166396331323863643731656661643934313835
6565303963393631310a666131313933623834313732633261633932326266376462333637356439
6238
admin_user: !vault |
icecast2_admin_user: !vault |
$ANSIBLE_VAULT;1.1;AES256
39306532623732636431353461353062346464343630303438373935666338356566373538336264
6662376439323937663565353636343865366132623230620a336130313131656332313864383434

View File

@@ -22,13 +22,13 @@
<authentication>
<!-- Sources log in with username 'source' -->
<source-password>{{ source_pass }}</source-password>
<source-password>{{ icecast2_source_pass }}</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>{{ relay_pass }}</relay-password>
<relay-password>{{ icecast2_relay_pass }}</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>{{ admin_user }}</admin-user>
<admin-password>{{ admin_pass }}</admin-password>
<admin-user>{{ icecast2_admin_user }}</admin-user>
<admin-password>{{ icecast2_admin_pass }}</admin-password>
</authentication>
<!-- set the mountpoint for a shoutcast source to use, the default if not

View File

@@ -20,6 +20,7 @@
cmd: /usr/bin/mysql_install_db --datadir=/srv/mysql
creates: /srv/mysql/ibdata1
become_user: mysql
become: true
notify: Restart mariadb
- name: Put mariadb configuration file

View File

@@ -2,5 +2,5 @@
- name: Restart postgres
ansible.builtin.service:
name: "postgresql@{{ pg_version }}-main"
name: "postgresql@{{ postgres_pg_version }}-main"
state: restarted

View File

@@ -15,7 +15,7 @@
- name: Populate postgresql directory
ansible.builtin.command:
cmd: "/usr/lib/postgresql/{{ pg_version }}/bin/initdb -E UTF-8 /srv/postgresql/"
cmd: "/usr/lib/postgresql/{{ postgres_pg_version }}/bin/initdb -E UTF-8 /srv/postgresql/"
creates: /srv/postgresql/PG_VERSION
become: true
become_user: postgres
@@ -24,14 +24,14 @@
- name: Put hba configuration files
ansible.builtin.copy:
src: "files/pg_hba.conf"
dest: "/etc/postgresql/{{ pg_version }}/main/pg_hba.conf"
dest: "/etc/postgresql/{{ postgres_pg_version }}/main/pg_hba.conf"
mode: "0640"
notify: Restart postgres
- name: Put main configuration files
ansible.builtin.template:
src: "postgresql.conf.j2"
dest: "/etc/postgresql/{{ pg_version }}/main/postgresql.conf"
dest: "/etc/postgresql/{{ postgres_pg_version }}/main/postgresql.conf"
mode: "0644"
- name: Create backup dir

View File

@@ -40,13 +40,13 @@
data_directory = '/srv/postgresql' # use data in another directory
# (change requires restart)
hba_file = '/etc/postgresql/{{ pg_version }}/main/pg_hba.conf' # host-based authentication file
hba_file = '/etc/postgresql/{{ postgres_pg_version }}/main/pg_hba.conf' # host-based authentication file
# (change requires restart)
ident_file = '/etc/postgresql/{{ pg_version }}/main/pg_ident.conf' # ident configuration file
ident_file = '/etc/postgresql/{{ postgres_pg_version }}/main/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
external_pid_file = '/var/run/postgresql/{{ pg_version }}-main.pid' # write an extra PID file
external_pid_file = '/var/run/postgresql/{{ postgres_pg_version }}-main.pid' # write an extra PID file
# (change requires restart)
@@ -484,7 +484,7 @@ log_timezone = 'Europe/Paris'
# PROCESS TITLE
#------------------------------------------------------------------------------
cluster_name = '{{ pg_version }}/main' # added to process titles if nonempty
cluster_name = '{{ postgres_pg_version }}/main' # added to process titles if nonempty
# (change requires restart)
#update_process_title = on
@@ -500,7 +500,7 @@ cluster_name = '{{ pg_version }}/main' # added to process titles if nonempty
#track_io_timing = off
#track_functions = none # none, pl, all
#track_activity_query_size = 1024 # (change requires restart)
#stats_temp_directory = '/var/run/postgresql/{{ pg_version }}-main.pg_stat_tmp'
#stats_temp_directory = '/var/run/postgresql/{{ postgres_pg_version }}-main.pg_stat_tmp'
# - Monitoring -

View File

@@ -1,10 +1,10 @@
---
pg_versions:
postgres_pg_versions:
Debian:
"9": 9.6
"10": 11
"11": 13
"12": 15
pg_version: "{{ pg_versions[ansible_os_family][ansible_distribution_major_version] }}"
postgres_pg_version: "{{ postgres_pg_versions[ansible_os_family][ansible_distribution_major_version] }}"

View File

@@ -26,5 +26,5 @@
state: present
insertbefore: '^# --- BEGIN PVE ---$'
line: "{{ item.address }} {{ item.name }}"
loop: "{{ pretty_named_hosts }}"
loop: "{{ rsyslog_pretty_named_hosts }}"
notify: Restart rsyslog

View File

@@ -1,6 +1,6 @@
---
pretty_named_hosts:
rsyslog_pretty_named_hosts:
- name: enbarr
address: 10.233.212.50
- name: garreg-mach

View File

@@ -1,26 +1,50 @@
---
- import_playbook: system.yml
- import_playbook: usb.yml
- import_playbook: smtprelay.yml
- import_playbook: restic.yml
- import_playbook: nut.yml
- import_playbook: syslog.yml
- import_playbook: firewall.yml
- import_playbook: mail.yml
- import_playbook: xmpp.yml
- import_playbook: webservers.yml
- import_playbook: loadbalancinghttp.yml
- import_playbook: docker.yml
- import_playbook: php.yml
- import_playbook: mariadb.yml
- import_playbook: pgsql.yml
- import_playbook: mastodon.yml
- import_playbook: bittorrent.yml
- import_playbook: mumble.yml
- import_playbook: icecast2.yml
- import_playbook: munin.yml
- import_playbook: ftp.yml
- import_playbook: garage.yml
- import_playbook: peertube.yml
- import_playbook: elasticsearch.yml
- name: Run system playbook
import_playbook: system.yml
- name: Run usb playbook
import_playbook: usb.yml
- name: Run smtprelay playbook
import_playbook: smtprelay.yml
- name: Run restic playbook
import_playbook: restic.yml
- name: Run nut playbook
import_playbook: nut.yml
- name: Run syslog playbook
import_playbook: syslog.yml
- name: Run firewall playbook
import_playbook: firewall.yml
- name: Run mail playbook
import_playbook: mail.yml
- name: Run xmpp playbook
import_playbook: xmpp.yml
- name: Run webservers playbook
import_playbook: webservers.yml
- name: Run loadbalancinghttp playbook
import_playbook: loadbalancinghttp.yml
- name: Run docker playbook
import_playbook: docker.yml
- name: Run php playbook
import_playbook: php.yml
- name: Run mariadb playbook
import_playbook: mariadb.yml
- name: Run pgsql playbook
import_playbook: pgsql.yml
- name: Run mastodon playbook
import_playbook: mastodon.yml
- name: Run bittorent playbook
import_playbook: bittorrent.yml
- name: Run mumble playbook
import_playbook: mumble.yml
- name: Run icecast2 playbook
import_playbook: icecast2.yml
- name: Run munin playbook
import_playbook: munin.yml
- name: Run ftp playbook
import_playbook: ftp.yml
- name: Run garage playbook
import_playbook: garage.yml
- name: Run peertube playbook
import_playbook: peertube.yml
- name: Run elasticsearch playbook
import_playbook: elasticsearch.yml