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
openwrt_init:
name: firewall

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,5 @@
---
- name: install postfix
package:
name: postfix
@@ -36,4 +38,3 @@
owner: root
group: root
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 %}"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,5 @@
---
- name: install z-push repokey
apt_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
shell: curl https://get.acme.sh | INSTALLONLINE=1 LE_WORKING_DIR=/etc/x509 sh
args:
creates: /etc/x509

View File

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

View File

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