style: linting

This commit is contained in:
VC
2024-07-05 11:53:13 +02:00
parent 66830fd2eb
commit 1f28d2242f
76 changed files with 469 additions and 335 deletions

View File

@@ -1,3 +1,5 @@
---
- name: reload firewall - name: reload firewall
openwrt_init: openwrt_init:
name: firewall name: firewall

View File

@@ -1,3 +1,5 @@
---
- name: generate firewall file - name: generate firewall file
template: template:
src: firewall.j2 src: firewall.j2

View File

@@ -1,3 +1,5 @@
---
- name: restart vsftpd - name: restart vsftpd
service: service:
name: vsftpd name: vsftpd

View File

@@ -1,3 +1,5 @@
---
- name: Install vsftpd - name: Install vsftpd
package: package:
name: vsftpd name: vsftpd

View File

@@ -1,3 +1,5 @@
---
- name: restart haproxy - name: restart haproxy
service: service:
name: haproxy name: haproxy

View File

@@ -1,3 +1,5 @@
---
- name: install haproxy package - name: install haproxy package
package: package:
name: haproxy name: haproxy

View File

@@ -1,3 +1,5 @@
---
source_pass: !vault | source_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
36383738646636353839616365316537653865666335353136666166336137636635663062626265 36383738646636353839616365316537653865666335353136666166336137636635663062626265

View File

@@ -1,3 +1,5 @@
---
- name: restart icecast2 - name: restart icecast2
service: service:
name: icecast2 name: icecast2

View File

@@ -1,3 +1,5 @@
---
- name: install icecast2 - name: install icecast2
package: package:
name: icecast2 name: icecast2
@@ -9,4 +11,3 @@
dest: /etc/icecast2/icecast.xml dest: /etc/icecast2/icecast.xml
notify: notify:
- restart icecast2 - restart icecast2

View File

@@ -1,3 +1,5 @@
---
- name: restart mailman3 - name: restart mailman3
service: service:
name: mailman3 name: mailman3

View File

@@ -1,3 +1,5 @@
---
- name: install mailman3 and dependencies - name: install mailman3 and dependencies
package: package:
name: "{{ item }}" name: "{{ item }}"

View File

@@ -1,3 +1,5 @@
---
mariadb_backup_hour: 5 mariadb_backup_hour: 5
mariadb_backup_minute: 0 mariadb_backup_minute: 0
mariadb_query_cache_memory: 64 mariadb_query_cache_memory: 64

View File

@@ -1,3 +1,5 @@
---
- name: restart mariadb - name: restart mariadb
service: service:
name: mariadb name: mariadb

View File

@@ -1,3 +1,5 @@
---
- name: install mariadb - name: install mariadb
package: package:
name: mariadb-server name: mariadb-server
@@ -109,4 +111,3 @@
minute: "{{ mariadb_backup_minute }}" minute: "{{ mariadb_backup_minute }}"
job: "/usr/local/bin/backup_mysql.sh" job: "/usr/local/bin/backup_mysql.sh"
state: present state: present

View File

@@ -1,3 +1,5 @@
---
- name: restart mumble - name: restart mumble
service: service:
name: mumble-server name: mumble-server

View File

@@ -1,3 +1,5 @@
---
- name: install mumble - name: install mumble
package: package:
name: mumble-server name: mumble-server

View File

@@ -1,3 +1,5 @@
---
- name: restart munin-node - name: restart munin-node
service: service:
name: munin-node name: munin-node

View File

@@ -1,13 +1,15 @@
---
- name: delete squid plugins - name: delete squid plugins
shell: shell:
cmd: "rm -f /etc/munin/plugins/squid_*" cmd: "rm -f /etc/munin/plugins/squid_*"
warn: False warn: false
notify: notify:
- restart munin-node - restart munin-node
- name: delete lxc interfaces plugins - name: delete lxc interfaces plugins
shell: shell:
cmd: "rm -f /etc/munin/plugins/if_*veth* /etc/munin/plugins/if_*fw* /etc/munin/plugins/if_*vmbr*" cmd: "rm -f /etc/munin/plugins/if_*veth* /etc/munin/plugins/if_*fw* /etc/munin/plugins/if_*vmbr*"
warn: False warn: false
notify: notify:
- restart munin-node - restart munin-node

View File

@@ -1,4 +1,5 @@
# For Munin servers ---
- name: deploy mikrotik unitary scripts - name: deploy mikrotik unitary scripts
copy: copy:
src: "./files/{{ item.0 }}" src: "./files/{{ item.0 }}"

View File

@@ -1,3 +1,4 @@
---
# for physical servers # for physical servers
- name: install necessary packages for hypervisors - name: install necessary packages for hypervisors
package: package:
@@ -13,4 +14,3 @@
- restart munin-node - restart munin-node
loop: loop:
- temp - temp

View File

@@ -1,3 +1,5 @@
---
- name: install munin packages - name: install munin packages
package: package:
name: munin name: munin
@@ -7,4 +9,3 @@
template: template:
src: munin.conf.j2 src: munin.conf.j2
dest: /etc/munin/munin.conf dest: /etc/munin/munin.conf

View File

@@ -1,3 +1,5 @@
---
- name: restart nginx - name: restart nginx
service: service:
name: nginx name: nginx

View File

@@ -1,3 +1,5 @@
---
- name: install nginx package - name: install nginx package
package: package:
name: nginx-full name: nginx-full

View File

@@ -1,9 +1,11 @@
---
- name: symlink vhosts - name: symlink vhosts
file: file:
src: "/etc/nginx/sites-available/{{ item }}.conf" src: "/etc/nginx/sites-available/{{ item }}.conf"
dest: "/etc/nginx/sites-enabled/{{ item }}.conf" dest: "/etc/nginx/sites-enabled/{{ item }}.conf"
force: True force: true
follow: False follow: false
state: link state: link
notify: notify:
- restart nginx - restart nginx

View File

@@ -1,3 +1,5 @@
---
- name: restart nut-client - name: restart nut-client
service: service:
name: nut-client name: nut-client

View File

@@ -1,3 +1,5 @@
---
- name: install nut client - name: install nut client
package: package:
name: nut-client name: nut-client

View File

@@ -1,3 +1,5 @@
---
- name: restart nut-server - name: restart nut-server
service: service:
name: nut-server name: nut-server

View File

@@ -1,3 +1,5 @@
---
- name: install nut server - name: install nut server
package: package:
name: nut-server name: nut-server

View File

@@ -1,3 +1,5 @@
---
- name: restart opendkim - name: restart opendkim
service: service:
name: opendkim name: opendkim

View File

@@ -1,3 +1,5 @@
---
- name: install opendkim - name: install opendkim
package: package:
name: "{{ item }}" name: "{{ item }}"
@@ -29,4 +31,3 @@
- TrustedHosts - TrustedHosts
notify: notify:
- restart opendkim - restart opendkim

View File

@@ -1,3 +1,5 @@
---
- name: restart opendmarc - name: restart opendmarc
service: service:
name: opendmarc name: opendmarc

View File

@@ -1,3 +1,5 @@
---
- name: install opendmarc - name: install opendmarc
package: package:
name: opendmarc name: opendmarc
@@ -23,4 +25,3 @@
- IgnoreHosts - IgnoreHosts
notify: notify:
- restart opendmarc - restart opendmarc

View File

@@ -1 +1,3 @@
---
php_modules: "['opcache', 'mysql', 'mbstring', 'gd']" php_modules: "['opcache', 'mysql', 'mbstring', 'gd']"

View File

@@ -1,3 +1,5 @@
---
- name: restart php-fpm - name: restart php-fpm
service: service:
name: "php{{ php_version }}-fpm" name: "php{{ php_version }}-fpm"

View File

@@ -1,3 +1,5 @@
---
- name: install php-fpm - name: install php-fpm
package: package:
name: php-fpm name: php-fpm
@@ -24,4 +26,3 @@
loop: "{{ php_modules }}" loop: "{{ php_modules }}"
notify: notify:
- restart php-fpm - restart php-fpm

View File

@@ -1,3 +1,5 @@
---
- name: postmap virtual-regexp - name: postmap virtual-regexp
command: postmap /etc/postfix/virtual-regexp command: postmap /etc/postfix/virtual-regexp
listen: "postmap files" listen: "postmap files"
@@ -10,5 +12,3 @@
service: service:
name: postfix name: postfix
state: restarted state: restarted

View File

@@ -1,3 +1,5 @@
---
- name: install postfix - name: install postfix
package: package:
name: postfix name: postfix
@@ -36,4 +38,3 @@
owner: root owner: root
group: root group: root
mode: '0755' mode: '0755'

View File

@@ -1 +1,3 @@
---
pg_version: "{% if ansible_facts['os_family'] == 'Debian' and ansible_facts['distribution_major_version'] == '9' %}9.6{% elif ansible_facts['os_family'] == 'Debian' and ansible_facts['distribution_major_version'] == '10' %}11{% elif ansible_facts['os_family'] == 'Debian' and ansible_facts['distribution_major_version'] == '11' %}13{% endif %}" pg_version: "{% if ansible_facts['os_family'] == 'Debian' and ansible_facts['distribution_major_version'] == '9' %}9.6{% elif ansible_facts['os_family'] == 'Debian' and ansible_facts['distribution_major_version'] == '10' %}11{% elif ansible_facts['os_family'] == 'Debian' and ansible_facts['distribution_major_version'] == '11' %}13{% endif %}"

View File

@@ -1,3 +1,5 @@
---
- name: restart postgres - name: restart postgres
service: service:
name: "postgresql@{{ pg_version }}-main" name: "postgresql@{{ pg_version }}-main"

View File

@@ -1,3 +1,5 @@
---
- name: install postgresql - name: install postgresql
package: package:
name: postgresql name: postgresql
@@ -12,7 +14,7 @@
- name: populate postgresql directory - name: populate postgresql directory
command: "/usr/lib/postgresql/{{ pg_version }}/bin/initdb -E UTF-8 /srv/postgresql/" command: "/usr/lib/postgresql/{{ pg_version }}/bin/initdb -E UTF-8 /srv/postgresql/"
become: yes become: true
become_user: postgres become_user: postgres
args: args:
creates: /srv/postgresql/PG_VERSION creates: /srv/postgresql/PG_VERSION

View File

@@ -1,3 +1,5 @@
---
- name: restart rsyslog - name: restart rsyslog
service: service:
name: rsyslog name: rsyslog

View File

@@ -1,3 +1,5 @@
---
- name: install rsyslog - name: install rsyslog
package: package:
name: rsyslog name: rsyslog

View File

@@ -1,3 +1,5 @@
---
pretty_named_hosts: pretty_named_hosts:
- name: enbarr - name: enbarr
address: 10.233.212.50 address: 10.233.212.50

View File

@@ -1,3 +1,5 @@
---
- name: restart postfix - name: restart postfix
service: service:
name: postfix name: postfix
@@ -5,4 +7,3 @@
- name: postmap sasl_passwd - name: postmap sasl_passwd
command: postmap /etc/postfix/sasl_passwd command: postmap /etc/postfix/sasl_passwd

View File

@@ -1,3 +1,5 @@
---
- name: install postfix smtp server - name: install postfix smtp server
package: package:
name: postfix name: postfix

View File

@@ -1,3 +1,5 @@
---
- name: restart sshd - name: restart sshd
service: service:
name: sshd name: sshd

View File

@@ -1,3 +1,5 @@
---
- name: install https transport for apt - name: install https transport for apt
package: package:
name: apt-transport-https name: apt-transport-https

View File

@@ -1,3 +1,5 @@
---
- name: install aptitude - name: install aptitude
package: package:
name: aptitude name: aptitude

View File

@@ -1,3 +1,5 @@
---
- name: copy basic bashrc files - name: copy basic bashrc files
copy: copy:
src: files/dotbashrc src: files/dotbashrc

View File

@@ -1,3 +1,5 @@
---
- name: install cron-apt - name: install cron-apt
package: package:
name: cron-apt name: cron-apt
@@ -7,4 +9,3 @@
copy: copy:
src: files/5-install src: files/5-install
dest: /etc/cron-apt/action.d/5-install dest: /etc/cron-apt/action.d/5-install

View File

@@ -1,3 +1,5 @@
---
- name: install cron - name: install cron
package: package:
name: cron name: cron

View File

@@ -1,3 +1,5 @@
---
- name: install curl - name: install curl
package: package:
name: curl name: curl

View File

@@ -1,3 +1,5 @@
---
- name: install gpg package - name: install gpg package
package: package:
name: gpg name: gpg

View File

@@ -1,3 +1,5 @@
---
- name: install htop - name: install htop
package: package:
name: htop name: htop

View File

@@ -1,3 +1,5 @@
---
- name: Set default locale to fr_FR.UTF-8 - name: Set default locale to fr_FR.UTF-8
debconf: debconf:
name: locales name: locales

View File

@@ -1,3 +1,5 @@
---
- file: - file:
src: /usr/share/zoneinfo/Europe/Paris src: /usr/share/zoneinfo/Europe/Paris
dest: /etc/localtime dest: /etc/localtime

View File

@@ -1,3 +1,5 @@
---
- name: install ping utility - name: install ping utility
package: package:
name: iputils-ping name: iputils-ping

View File

@@ -1,3 +1,5 @@
---
- name: ssh configuration file - name: ssh configuration file
template: template:
src: sshd_config.j2 src: sshd_config.j2

View File

@@ -1,3 +1,5 @@
---
- name: install telnet - name: install telnet
package: package:
name: telnet name: telnet

View File

@@ -1,3 +1,5 @@
---
- name: install vim package - name: install vim package
package: package:
name: vim name: vim

View File

@@ -1,3 +1,5 @@
---
- name: install wget package - name: install wget package
package: package:
name: wget name: wget

View File

@@ -1,3 +1,5 @@
---
- name: Add APT Key for Unifi - name: Add APT Key for Unifi
get_url: get_url:
url: https://dl.ui.com/unifi/unifi-repo.gpg url: https://dl.ui.com/unifi/unifi-repo.gpg

View File

@@ -1,3 +1,5 @@
---
- name: reload udev - name: reload udev
command: "{{ item }}" command: "{{ item }}"
loop: loop:

View File

@@ -1,3 +1,5 @@
---
- name: USB Udev rules - name: USB Udev rules
copy: copy:
src: files/50-usb.rules src: files/50-usb.rules

View File

@@ -1,3 +1,5 @@
---
- name: restart nginx - name: restart nginx
service: service:
name: nginx name: nginx

View File

@@ -1,3 +1,5 @@
---
- name: include ttrss for web1 - name: include ttrss for web1
include_tasks: ttrss.yml include_tasks: ttrss.yml
when: inventory_hostname == 'web1.dmz.mateu.be' when: inventory_hostname == 'web1.dmz.mateu.be'

View File

@@ -1,3 +1,5 @@
---
- name: crontab for matomo - name: crontab for matomo
cron: cron:
name: Matomo reports name: Matomo reports

View File

@@ -1,3 +1,5 @@
---
- name: php-fpm nextcloud specific configuration - name: php-fpm nextcloud specific configuration
copy: copy:
src: files/oc.conf src: files/oc.conf

View File

@@ -1,3 +1,5 @@
---
- name: install scootaloo - name: install scootaloo
copy: copy:
src: files/bin/scootaloo src: files/bin/scootaloo
@@ -35,4 +37,3 @@
user: www-data user: www-data
minute: "*/5" minute: "*/5"
job: "{{ scootaloo_bin_path }} > /dev/null" job: "{{ scootaloo_bin_path }} > /dev/null"

View File

@@ -1,3 +1,5 @@
---
- name: cron for tootctl - name: cron for tootctl
cron: cron:
name: Mastodon tootctl name: Mastodon tootctl

View File

@@ -1,3 +1,5 @@
---
- name: systemd file for backend - name: systemd file for backend
copy: copy:
src: files/ttrss_backend.service src: files/ttrss_backend.service
@@ -13,4 +15,3 @@
package: package:
name: git name: git
state: present state: present

View File

@@ -1,3 +1,5 @@
---
- name: nginx cache - name: nginx cache
copy: copy:
src: files/fastcgi_cache.conf src: files/fastcgi_cache.conf

View File

@@ -1,3 +1,5 @@
---
- name: install z-push repokey - name: install z-push repokey
apt_key: apt_key:
url: https://download.kopano.io/zhub/z-push%3A/final/Debian_10/Release.key url: https://download.kopano.io/zhub/z-push%3A/final/Debian_10/Release.key

View File

@@ -1,5 +1,6 @@
---
- name: install acme.sh - name: install acme.sh
shell: curl https://get.acme.sh | INSTALLONLINE=1 LE_WORKING_DIR=/etc/x509 sh shell: curl https://get.acme.sh | INSTALLONLINE=1 LE_WORKING_DIR=/etc/x509 sh
args: args:
creates: /etc/x509 creates: /etc/x509

View File

@@ -1,3 +1,5 @@
---
- name: restart prosody - name: restart prosody
service: service:
name: prosody name: prosody

View File

@@ -1,3 +1,5 @@
---
- name: install prosody - name: install prosody
package: package:
name: "{{ item }}" name: "{{ item }}"
@@ -24,4 +26,3 @@
dest: /etc/prosody/prosody.cfg.lua dest: /etc/prosody/prosody.cfg.lua
notify: notify:
- restart prosody - restart prosody