style: linting
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: reload firewall
|
- name: reload firewall
|
||||||
openwrt_init:
|
openwrt_init:
|
||||||
name: firewall
|
name: firewall
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: generate firewall file
|
- name: generate firewall file
|
||||||
template:
|
template:
|
||||||
src: firewall.j2
|
src: firewall.j2
|
||||||
dest: /etc/config/firewall
|
dest: /etc/config/firewall
|
||||||
notify: reload firewall
|
notify: reload firewall
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart vsftpd
|
- name: restart vsftpd
|
||||||
service:
|
service:
|
||||||
name: vsftpd
|
name: vsftpd
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: Install vsftpd
|
- name: Install vsftpd
|
||||||
package:
|
package:
|
||||||
name: vsftpd
|
name: vsftpd
|
||||||
@@ -5,15 +7,15 @@
|
|||||||
|
|
||||||
- name: Create ftp directory
|
- name: Create ftp directory
|
||||||
file:
|
file:
|
||||||
path: /srv/ftp
|
path: /srv/ftp
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Create upload directory
|
- name: Create upload directory
|
||||||
file:
|
file:
|
||||||
path: /srv/ftp/upload
|
path: /srv/ftp/upload
|
||||||
owner: ftp
|
owner: ftp
|
||||||
group: root
|
group: root
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Config vsftpd
|
- name: Config vsftpd
|
||||||
copy:
|
copy:
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart haproxy
|
- name: restart haproxy
|
||||||
service:
|
service:
|
||||||
name: haproxy
|
name: haproxy
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install haproxy package
|
- name: install haproxy package
|
||||||
package:
|
package:
|
||||||
name: haproxy
|
name: haproxy
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
source_pass: !vault |
|
source_pass: !vault |
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
36383738646636353839616365316537653865666335353136666166336137636635663062626265
|
36383738646636353839616365316537653865666335353136666166336137636635663062626265
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart icecast2
|
- name: restart icecast2
|
||||||
service:
|
service:
|
||||||
name: icecast2
|
name: icecast2
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install icecast2
|
- name: install icecast2
|
||||||
package:
|
package:
|
||||||
name: icecast2
|
name: icecast2
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: configuration file
|
- name: configuration file
|
||||||
template:
|
template:
|
||||||
src: icecast.xml.j2
|
src: icecast.xml.j2
|
||||||
dest: /etc/icecast2/icecast.xml
|
dest: /etc/icecast2/icecast.xml
|
||||||
notify:
|
notify:
|
||||||
- restart icecast2
|
- restart icecast2
|
||||||
|
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart mailman3
|
- name: restart mailman3
|
||||||
service:
|
service:
|
||||||
name: mailman3
|
name: mailman3
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install mailman3 and dependencies
|
- name: install mailman3 and dependencies
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
loop:
|
loop:
|
||||||
- mailman3-full
|
- mailman3-full
|
||||||
- sqlite3
|
- sqlite3
|
||||||
|
@@ -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
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart mariadb
|
- name: restart mariadb
|
||||||
service:
|
service:
|
||||||
name: mariadb
|
name: mariadb
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: daemon-reload
|
- name: daemon-reload
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
|
@@ -1,34 +1,36 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install mariadb
|
- name: install mariadb
|
||||||
package:
|
package:
|
||||||
name: mariadb-server
|
name: mariadb-server
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: create mysql directory
|
- name: create mysql directory
|
||||||
file:
|
file:
|
||||||
path: /srv/mysql
|
path: /srv/mysql
|
||||||
owner: mysql
|
owner: mysql
|
||||||
group: mysql
|
group: mysql
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: populate mysql directory
|
- name: populate mysql directory
|
||||||
command: /usr/bin/mysql_install_db --datadir=/srv/mysql
|
command: /usr/bin/mysql_install_db --datadir=/srv/mysql
|
||||||
args:
|
args:
|
||||||
creates: /srv/mysql/ibdata1
|
creates: /srv/mysql/ibdata1
|
||||||
notify: restart mariadb
|
notify: restart mariadb
|
||||||
|
|
||||||
- name: replace conffile
|
- name: replace conffile
|
||||||
template:
|
template:
|
||||||
src: 50-server.cnf.j2
|
src: 50-server.cnf.j2
|
||||||
dest: /etc/mysql/mariadb.conf.d/50-server.cnf
|
dest: /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||||
notify: restart mariadb
|
notify: restart mariadb
|
||||||
|
|
||||||
- name: debian upgrade file conf
|
- name: debian upgrade file conf
|
||||||
template:
|
template:
|
||||||
src: debian.cnf.j2
|
src: debian.cnf.j2
|
||||||
dest: /etc/mysql/debian.cnf
|
dest: /etc/mysql/debian.cnf
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
notify: restart mariadb
|
notify: restart mariadb
|
||||||
|
|
||||||
- name: force handlers
|
- name: force handlers
|
||||||
@@ -36,8 +38,8 @@
|
|||||||
|
|
||||||
- name: install python-mysql
|
- name: install python-mysql
|
||||||
package:
|
package:
|
||||||
name: python3-pymysql
|
name: python3-pymysql
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: check if .my.cnf file exists
|
- name: check if .my.cnf file exists
|
||||||
stat:
|
stat:
|
||||||
@@ -98,15 +100,14 @@
|
|||||||
|
|
||||||
- name: install backup script
|
- name: install backup script
|
||||||
copy:
|
copy:
|
||||||
src: files/backup_mysql.sh
|
src: files/backup_mysql.sh
|
||||||
dest: /usr/local/bin/backup_mysql.sh
|
dest: /usr/local/bin/backup_mysql.sh
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: cron backup script
|
- name: cron backup script
|
||||||
cron:
|
cron:
|
||||||
name: "MariaDB backup"
|
name: "MariaDB backup"
|
||||||
hour: "{{ mariadb_backup_hour }}"
|
hour: "{{ mariadb_backup_hour }}"
|
||||||
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
|
||||||
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart mumble
|
- name: restart mumble
|
||||||
service:
|
service:
|
||||||
name: mumble-server
|
name: mumble-server
|
||||||
|
@@ -1,11 +1,13 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install mumble
|
- name: install mumble
|
||||||
package:
|
package:
|
||||||
name: mumble-server
|
name: mumble-server
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: configuration files
|
- name: configuration files
|
||||||
copy:
|
copy:
|
||||||
src: ./files/mumble-server.ini
|
src: ./files/mumble-server.ini
|
||||||
dest: /etc/mumble-server.ini
|
dest: /etc/mumble-server.ini
|
||||||
notify:
|
notify:
|
||||||
- restart mumble
|
- restart mumble
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart munin-node
|
- name: restart munin-node
|
||||||
service:
|
service:
|
||||||
name: munin-node
|
name: munin-node
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -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
|
||||||
|
@@ -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 }}"
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
|
---
|
||||||
# for physical servers
|
# for physical servers
|
||||||
- name: install necessary packages for hypervisors
|
- name: install necessary packages for hypervisors
|
||||||
package:
|
package:
|
||||||
name: lm-sensors
|
name: lm-sensors
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: configure specific munin plugin
|
- name: configure specific munin plugin
|
||||||
file:
|
file:
|
||||||
path: "/etc/munin/plugins/sensors_{{ item }}"
|
path: "/etc/munin/plugins/sensors_{{ item }}"
|
||||||
src: /usr/share/munin/plugins/sensors_
|
src: /usr/share/munin/plugins/sensors_
|
||||||
state: link
|
state: link
|
||||||
notify:
|
notify:
|
||||||
- restart munin-node
|
- restart munin-node
|
||||||
loop:
|
loop:
|
||||||
- temp
|
- temp
|
||||||
|
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install munin packages
|
- name: install munin packages
|
||||||
package:
|
package:
|
||||||
name: munin
|
name: munin
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: munin conf file
|
- name: munin conf file
|
||||||
template:
|
template:
|
||||||
src: munin.conf.j2
|
src: munin.conf.j2
|
||||||
dest: /etc/munin/munin.conf
|
dest: /etc/munin/munin.conf
|
||||||
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart nginx
|
- name: restart nginx
|
||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install nginx package
|
- name: install nginx package
|
||||||
package:
|
package:
|
||||||
name: nginx-full
|
name: nginx-full
|
||||||
@@ -15,26 +17,26 @@
|
|||||||
notify:
|
notify:
|
||||||
- restart nginx
|
- restart nginx
|
||||||
loop:
|
loop:
|
||||||
- { src: nginx.conf.j2, dest: /etc/nginx/nginx.conf }
|
- {src: nginx.conf.j2, dest: /etc/nginx/nginx.conf}
|
||||||
- { src: nginx.ssl.conf.j2, dest: /etc/nginx/nginx.ssl.conf }
|
- {src: nginx.ssl.conf.j2, dest: /etc/nginx/nginx.ssl.conf}
|
||||||
- { src: fastcgi_params.j2, dest: /etc/nginx/fastcgi_params }
|
- {src: fastcgi_params.j2, dest: /etc/nginx/fastcgi_params}
|
||||||
- { src: proxy_params.j2, dest: /etc/nginx/proxy_params }
|
- {src: proxy_params.j2, dest: /etc/nginx/proxy_params}
|
||||||
- { src: default.j2, dest: /etc/nginx/sites-available/default }
|
- {src: default.j2, dest: /etc/nginx/sites-available/default}
|
||||||
|
|
||||||
- name: create base dir
|
- name: create base dir
|
||||||
file:
|
file:
|
||||||
path: /srv/http
|
path: /srv/http
|
||||||
owner: root
|
owner: root
|
||||||
group: www-data
|
group: www-data
|
||||||
mode: 'u+rwx,g+rs,o-rwx'
|
mode: 'u+rwx,g+rs,o-rwx'
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: create letsencrypt dir
|
- name: create letsencrypt dir
|
||||||
file:
|
file:
|
||||||
path: /srv/http/common/letsencrypt
|
path: /srv/http/common/letsencrypt
|
||||||
owner: root
|
owner: root
|
||||||
group: www-data
|
group: www-data
|
||||||
mode: 'u+rwx,g+rs,o-rwx'
|
mode: 'u+rwx,g+rs,o-rwx'
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- include_tasks: vhosts.yml
|
- include_tasks: vhosts.yml
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- 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
|
||||||
loop: "{{ web_hostname }}"
|
loop: "{{ web_hostname }}"
|
||||||
|
|
||||||
- name: install vhosts
|
- name: install vhosts
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart nut-client
|
- name: restart nut-client
|
||||||
service:
|
service:
|
||||||
name: nut-client
|
name: nut-client
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,19 +1,21 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install nut client
|
- name: install nut client
|
||||||
package:
|
package:
|
||||||
name: nut-client
|
name: nut-client
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: upsmon.conf file
|
- name: upsmon.conf file
|
||||||
template:
|
template:
|
||||||
src: upsmon.conf.j2
|
src: upsmon.conf.j2
|
||||||
dest: /etc/nut/upsmon.conf
|
dest: /etc/nut/upsmon.conf
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart nut-client
|
notify: restart nut-client
|
||||||
|
|
||||||
- name: nut.conf file
|
- name: nut.conf file
|
||||||
copy:
|
copy:
|
||||||
src: files/nut.conf
|
src: files/nut.conf
|
||||||
dest: /etc/nut/nut.conf
|
dest: /etc/nut/nut.conf
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
when: inventory_hostname not in groups['nut_server']
|
when: inventory_hostname not in groups['nut_server']
|
||||||
notify: restart nut-client
|
notify: restart nut-client
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart nut-server
|
- name: restart nut-server
|
||||||
service:
|
service:
|
||||||
name: nut-server
|
name: nut-server
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: udev
|
- name: udev
|
||||||
command: "udevadm control --reload-rules && udevadm trigger"
|
command: "udevadm control --reload-rules && udevadm trigger"
|
||||||
|
|
||||||
- name: restart nut-driver
|
- name: restart nut-driver
|
||||||
service:
|
service:
|
||||||
name: nut-driver
|
name: nut-driver
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,40 +1,42 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install nut server
|
- name: install nut server
|
||||||
package:
|
package:
|
||||||
name: nut-server
|
name: nut-server
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: udev conf file for nut
|
- name: udev conf file for nut
|
||||||
copy:
|
copy:
|
||||||
src: files/90-nut-ups.rules
|
src: files/90-nut-ups.rules
|
||||||
dest: /etc/udev/rules.d/90-nut-ups.rules
|
dest: /etc/udev/rules.d/90-nut-ups.rules
|
||||||
notify:
|
notify:
|
||||||
- udev
|
- udev
|
||||||
- restart nut-driver
|
- restart nut-driver
|
||||||
|
|
||||||
- name: nut.conf file
|
- name: nut.conf file
|
||||||
copy:
|
copy:
|
||||||
src: files/nut.conf
|
src: files/nut.conf
|
||||||
dest: /etc/nut/nut.conf
|
dest: /etc/nut/nut.conf
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart nut-server
|
notify: restart nut-server
|
||||||
|
|
||||||
- name: ups.conf file
|
- name: ups.conf file
|
||||||
copy:
|
copy:
|
||||||
src: files/ups.conf
|
src: files/ups.conf
|
||||||
dest: /etc/nut/ups.conf
|
dest: /etc/nut/ups.conf
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart nut-server
|
notify: restart nut-server
|
||||||
|
|
||||||
- name: upsd.conf file
|
- name: upsd.conf file
|
||||||
copy:
|
copy:
|
||||||
src: files/upsd.conf
|
src: files/upsd.conf
|
||||||
dest: /etc/nut/upsd.conf
|
dest: /etc/nut/upsd.conf
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart nut-server
|
notify: restart nut-server
|
||||||
|
|
||||||
- name: upsd.users file
|
- name: upsd.users file
|
||||||
template:
|
template:
|
||||||
src: upsd.users.j2
|
src: upsd.users.j2
|
||||||
dest: /etc/nut/upsd.users
|
dest: /etc/nut/upsd.users
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart nut-server
|
notify: restart nut-server
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart opendkim
|
- name: restart opendkim
|
||||||
service:
|
service:
|
||||||
name: opendkim
|
name: opendkim
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,32 +1,33 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install opendkim
|
- name: install opendkim
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
loop:
|
loop:
|
||||||
- opendkim
|
- opendkim
|
||||||
- opendkim-tools
|
- opendkim-tools
|
||||||
|
|
||||||
- name: main configuration files
|
- name: main configuration files
|
||||||
template:
|
template:
|
||||||
src: opendkim.conf
|
src: opendkim.conf
|
||||||
dest: /etc/opendkim.conf
|
dest: /etc/opendkim.conf
|
||||||
notify:
|
notify:
|
||||||
- restart opendkim
|
- restart opendkim
|
||||||
|
|
||||||
- name: dkim directory
|
- name: dkim directory
|
||||||
file:
|
file:
|
||||||
path: /etc/dkim
|
path: /etc/dkim
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: secondary configuration files
|
- name: secondary configuration files
|
||||||
copy:
|
copy:
|
||||||
src: "./files/dkim/{{ item }}"
|
src: "./files/dkim/{{ item }}"
|
||||||
dest: "/etc/dkim/{{ item }}"
|
dest: "/etc/dkim/{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- KeyTable
|
- KeyTable
|
||||||
- PeerList
|
- PeerList
|
||||||
- SigningTable
|
- SigningTable
|
||||||
- TrustedHosts
|
- TrustedHosts
|
||||||
notify:
|
notify:
|
||||||
- restart opendkim
|
- restart opendkim
|
||||||
|
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart opendmarc
|
- name: restart opendmarc
|
||||||
service:
|
service:
|
||||||
name: opendmarc
|
name: opendmarc
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,26 +1,27 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install opendmarc
|
- name: install opendmarc
|
||||||
package:
|
package:
|
||||||
name: opendmarc
|
name: opendmarc
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: opendmarc config file
|
- name: opendmarc config file
|
||||||
copy:
|
copy:
|
||||||
src: ./files/opendmarc.conf
|
src: ./files/opendmarc.conf
|
||||||
dest: /etc/opendmarc.conf
|
dest: /etc/opendmarc.conf
|
||||||
notify:
|
notify:
|
||||||
- restart opendmarc
|
- restart opendmarc
|
||||||
|
|
||||||
- name: dmarc directory
|
- name: dmarc directory
|
||||||
file:
|
file:
|
||||||
path: /etc/dmarc
|
path: /etc/dmarc
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: secondary configuration files
|
- name: secondary configuration files
|
||||||
copy:
|
copy:
|
||||||
src: "./files/dmarc/{{ item }}"
|
src: "./files/dmarc/{{ item }}"
|
||||||
dest: "/etc/dmarc/{{ item }}"
|
dest: "/etc/dmarc/{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- IgnoreHosts
|
- IgnoreHosts
|
||||||
notify:
|
notify:
|
||||||
- restart opendmarc
|
- restart opendmarc
|
||||||
|
|
||||||
|
@@ -1 +1,3 @@
|
|||||||
|
---
|
||||||
|
|
||||||
php_modules: "['opcache', 'mysql', 'mbstring', 'gd']"
|
php_modules: "['opcache', 'mysql', 'mbstring', 'gd']"
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
service:
|
service:
|
||||||
name: "php{{ php_version }}-fpm"
|
name: "php{{ php_version }}-fpm"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install php-fpm
|
- name: install php-fpm
|
||||||
package:
|
package:
|
||||||
name: php-fpm
|
name: php-fpm
|
||||||
@@ -5,17 +7,17 @@
|
|||||||
|
|
||||||
- name: configure php-fpm
|
- name: configure php-fpm
|
||||||
template:
|
template:
|
||||||
src: www.conf.j2
|
src: www.conf.j2
|
||||||
dest: /etc/php/{{ php_version }}/fpm/pool.d/www.conf
|
dest: /etc/php/{{ php_version }}/fpm/pool.d/www.conf
|
||||||
notify:
|
notify:
|
||||||
- restart php-fpm
|
- restart php-fpm
|
||||||
|
|
||||||
- name: configure php
|
- name: configure php
|
||||||
copy:
|
copy:
|
||||||
src: ./files/php.ini
|
src: ./files/php.ini
|
||||||
dest: /etc/php/{{ php_version }}/fpm/php.ini
|
dest: /etc/php/{{ php_version }}/fpm/php.ini
|
||||||
notify:
|
notify:
|
||||||
- restart php-fpm
|
- restart php-fpm
|
||||||
|
|
||||||
- name: install lib for php
|
- name: install lib for php
|
||||||
package:
|
package:
|
||||||
@@ -23,5 +25,4 @@
|
|||||||
state: present
|
state: present
|
||||||
loop: "{{ php_modules }}"
|
loop: "{{ php_modules }}"
|
||||||
notify:
|
notify:
|
||||||
- restart php-fpm
|
- restart php-fpm
|
||||||
|
|
||||||
|
@@ -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"
|
||||||
@@ -8,7 +10,5 @@
|
|||||||
|
|
||||||
- name: restart postfix
|
- name: restart postfix
|
||||||
service:
|
service:
|
||||||
name: postfix
|
name: postfix
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,39 +1,40 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install postfix
|
- name: install postfix
|
||||||
package:
|
package:
|
||||||
name: postfix
|
name: postfix
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: install mailutils
|
- name: install mailutils
|
||||||
package:
|
package:
|
||||||
name: mailutils
|
name: mailutils
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: main configuration files
|
- name: main configuration files
|
||||||
copy:
|
copy:
|
||||||
src: "./files/{{ item }}"
|
src: "./files/{{ item }}"
|
||||||
dest: "/etc/postfix/{{ item }}"
|
dest: "/etc/postfix/{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- main.cf
|
- main.cf
|
||||||
- master.cf
|
- master.cf
|
||||||
notify:
|
notify:
|
||||||
- restart postfix
|
- restart postfix
|
||||||
|
|
||||||
- name: map files
|
- name: map files
|
||||||
copy:
|
copy:
|
||||||
src: "./files/{{ item }}"
|
src: "./files/{{ item }}"
|
||||||
dest: "/etc/postfix/{{ item }}"
|
dest: "/etc/postfix/{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- transport
|
- transport
|
||||||
- virtual-regexp
|
- virtual-regexp
|
||||||
notify:
|
notify:
|
||||||
- postmap files
|
- postmap files
|
||||||
- restart postfix
|
- restart postfix
|
||||||
|
|
||||||
- name: mail generation script
|
- name: mail generation script
|
||||||
copy:
|
copy:
|
||||||
src: ./files/generate_email.sh
|
src: ./files/generate_email.sh
|
||||||
dest: /usr/local/bin/generate_email.sh
|
dest: /usr/local/bin/generate_email.sh
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
|
@@ -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 %}"
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart postgres
|
- name: restart postgres
|
||||||
service:
|
service:
|
||||||
name: "postgresql@{{ pg_version }}-main"
|
name: "postgresql@{{ pg_version }}-main"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install postgresql
|
- name: install postgresql
|
||||||
package:
|
package:
|
||||||
name: postgresql
|
name: postgresql
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: create pgsql directory
|
- name: create pgsql directory
|
||||||
file:
|
file:
|
||||||
@@ -12,35 +14,35 @@
|
|||||||
|
|
||||||
- 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
|
||||||
notify: restart postgres
|
notify: restart postgres
|
||||||
|
|
||||||
- name: replace main conffile
|
- name: replace main conffile
|
||||||
copy:
|
copy:
|
||||||
src: files/postgresql.conf
|
src: files/postgresql.conf
|
||||||
dest: "/etc/postgresql/{{ pg_version }}/main/postgresql.conf"
|
dest: "/etc/postgresql/{{ pg_version }}/main/postgresql.conf"
|
||||||
notify: restart postgres
|
notify: restart postgres
|
||||||
|
|
||||||
- name: replace pg_hba file
|
- name: replace pg_hba file
|
||||||
copy:
|
copy:
|
||||||
src: files/pg_hba.conf
|
src: files/pg_hba.conf
|
||||||
dest: "/etc/postgresql/{{ pg_version }}/main/pg_hba.conf"
|
dest: "/etc/postgresql/{{ pg_version }}/main/pg_hba.conf"
|
||||||
notify: restart postgres
|
notify: restart postgres
|
||||||
|
|
||||||
- name: create backup dir
|
- name: create backup dir
|
||||||
file:
|
file:
|
||||||
path: /srv/backup/pgsql
|
path: /srv/backup/pgsql
|
||||||
owner: postgres
|
owner: postgres
|
||||||
group: postgres
|
group: postgres
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: backup pg databases
|
- name: backup pg databases
|
||||||
cron:
|
cron:
|
||||||
user: postgres
|
user: postgres
|
||||||
minute: "0"
|
minute: "0"
|
||||||
hour: "4"
|
hour: "4"
|
||||||
name: PG Backup
|
name: PG Backup
|
||||||
job: "/usr/bin/pg_dumpall | gzip -c > /srv/backup/pgsql/all.dbs.gz"
|
job: "/usr/bin/pg_dumpall | gzip -c > /srv/backup/pgsql/all.dbs.gz"
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart rsyslog
|
- name: restart rsyslog
|
||||||
service:
|
service:
|
||||||
name: rsyslog
|
name: rsyslog
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,19 +1,21 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install rsyslog
|
- name: install rsyslog
|
||||||
package:
|
package:
|
||||||
name: rsyslog
|
name: rsyslog
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: put log concentration file
|
- name: put log concentration file
|
||||||
copy:
|
copy:
|
||||||
src: files/sys.conf
|
src: files/sys.conf
|
||||||
dest: /etc/rsyslog.d/sys.conf
|
dest: /etc/rsyslog.d/sys.conf
|
||||||
notify: restart rsyslog
|
notify: restart rsyslog
|
||||||
when: "'rsyslogservers' in group_names"
|
when: "'rsyslogservers' in group_names"
|
||||||
|
|
||||||
- name: put rsyslog config file
|
- name: put rsyslog config file
|
||||||
copy:
|
copy:
|
||||||
src: files/remote.conf
|
src: files/remote.conf
|
||||||
dest: /etc/rsyslog.d/remote.conf
|
dest: /etc/rsyslog.d/remote.conf
|
||||||
notify: restart rsyslog
|
notify: restart rsyslog
|
||||||
|
|
||||||
- name: insert hosts into /etc/hosts
|
- name: insert hosts into /etc/hosts
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
pretty_named_hosts:
|
pretty_named_hosts:
|
||||||
- name: enbarr
|
- name: enbarr
|
||||||
address: 10.233.212.50
|
address: 10.233.212.50
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart postfix
|
- name: restart postfix
|
||||||
service:
|
service:
|
||||||
name: postfix
|
name: postfix
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: postmap sasl_passwd
|
- name: postmap sasl_passwd
|
||||||
command: postmap /etc/postfix/sasl_passwd
|
command: postmap /etc/postfix/sasl_passwd
|
||||||
|
|
||||||
|
@@ -1,25 +1,27 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install postfix smtp server
|
- name: install postfix smtp server
|
||||||
package:
|
package:
|
||||||
name: postfix
|
name: postfix
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: install libsasl2
|
- name: install libsasl2
|
||||||
package:
|
package:
|
||||||
name: libsasl2-modules
|
name: libsasl2-modules
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: install sasl_passwd file
|
- name: install sasl_passwd file
|
||||||
template:
|
template:
|
||||||
src: sasl_passwd.j2
|
src: sasl_passwd.j2
|
||||||
dest: /etc/postfix/sasl_passwd
|
dest: /etc/postfix/sasl_passwd
|
||||||
mode: 0640
|
mode: 0640
|
||||||
notify:
|
notify:
|
||||||
- postmap sasl_passwd
|
- postmap sasl_passwd
|
||||||
- restart postfix
|
- restart postfix
|
||||||
|
|
||||||
- name: install default postfix main.cf
|
- name: install default postfix main.cf
|
||||||
template:
|
template:
|
||||||
src: main.cf.j2
|
src: main.cf.j2
|
||||||
dest: /etc/postfix/main.cf
|
dest: /etc/postfix/main.cf
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart postfix
|
notify: restart postfix
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart sshd
|
- name: restart sshd
|
||||||
service:
|
service:
|
||||||
name: sshd
|
name: sshd
|
||||||
|
@@ -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
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install aptitude
|
- name: install aptitude
|
||||||
package:
|
package:
|
||||||
name: aptitude
|
name: aptitude
|
||||||
state: present
|
state: present
|
||||||
when: ansible_facts['os_family'] == 'Debian'
|
when: ansible_facts['os_family'] == 'Debian'
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: copy basic bashrc files
|
- name: copy basic bashrc files
|
||||||
copy:
|
copy:
|
||||||
src: files/dotbashrc
|
src: files/dotbashrc
|
||||||
dest: /root/.bashrc
|
dest: /root/.bashrc
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install cron-apt
|
- name: install cron-apt
|
||||||
package:
|
package:
|
||||||
name: cron-apt
|
name: cron-apt
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: default configuration file
|
- name: default configuration file
|
||||||
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
|
||||||
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install cron
|
- name: install cron
|
||||||
package:
|
package:
|
||||||
name: cron
|
name: cron
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install curl
|
- name: install curl
|
||||||
package:
|
package:
|
||||||
name: curl
|
name: curl
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install gpg package
|
- name: install gpg package
|
||||||
package:
|
package:
|
||||||
name: gpg
|
name: gpg
|
||||||
state: present
|
state: present
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install htop
|
- name: install htop
|
||||||
package:
|
package:
|
||||||
name: htop
|
name: htop
|
||||||
state: present
|
state: present
|
||||||
|
@@ -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
|
||||||
@@ -13,8 +15,8 @@
|
|||||||
vtype: multiselect
|
vtype: multiselect
|
||||||
- name: delete original locale.gen
|
- name: delete original locale.gen
|
||||||
file:
|
file:
|
||||||
path: /etc/locale.gen
|
path: /etc/locale.gen
|
||||||
state: absent
|
state: absent
|
||||||
when: ansible_facts['env']['LANG'] != 'fr_FR.UTF-8'
|
when: ansible_facts['env']['LANG'] != 'fr_FR.UTF-8'
|
||||||
|
|
||||||
- name: update original locale.gen
|
- name: update original locale.gen
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- file:
|
- file:
|
||||||
src: /usr/share/zoneinfo/Europe/Paris
|
src: /usr/share/zoneinfo/Europe/Paris
|
||||||
dest: /etc/localtime
|
dest: /etc/localtime
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install ping utility
|
- name: install ping utility
|
||||||
package:
|
package:
|
||||||
name: iputils-ping
|
name: iputils-ping
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: ssh configuration file
|
- name: ssh configuration file
|
||||||
template:
|
template:
|
||||||
src: sshd_config.j2
|
src: sshd_config.j2
|
||||||
@@ -7,15 +9,15 @@
|
|||||||
|
|
||||||
- name: ssh keys home
|
- name: ssh keys home
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', 'ssh/home.id_rsa.pub') }}"
|
key: "{{ lookup('file', 'ssh/home.id_rsa.pub') }}"
|
||||||
|
|
||||||
- name: ssh keys work
|
- name: ssh keys work
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', 'ssh/work.id_rsa.pub') }}"
|
key: "{{ lookup('file', 'ssh/work.id_rsa.pub') }}"
|
||||||
|
|
||||||
- name: remove old work key
|
- name: remove old work key
|
||||||
authorized_key:
|
authorized_key:
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install telnet
|
- name: install telnet
|
||||||
package:
|
package:
|
||||||
name: telnet
|
name: telnet
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install vim package
|
- name: install vim package
|
||||||
package:
|
package:
|
||||||
name: vim
|
name: vim
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: copy vimrc config file
|
- name: copy vimrc config file
|
||||||
copy:
|
copy:
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install wget package
|
- name: install wget package
|
||||||
package:
|
package:
|
||||||
name: wget
|
name: wget
|
||||||
|
@@ -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
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: reload udev
|
- name: reload udev
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: USB Udev rules
|
- name: USB Udev rules
|
||||||
copy:
|
copy:
|
||||||
src: files/50-usb.rules
|
src: files/50-usb.rules
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart nginx
|
- name: restart nginx
|
||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
service:
|
service:
|
||||||
name: "php{{ php_version }}-fpm"
|
name: "php{{ php_version }}-fpm"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -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'
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: crontab for matomo
|
- name: crontab for matomo
|
||||||
cron:
|
cron:
|
||||||
name: Matomo reports
|
name: Matomo reports
|
||||||
user: www-data
|
user: www-data
|
||||||
minute: "5"
|
minute: "5"
|
||||||
job: "/usr/bin/php /srv/http/analyse.nintendojo.fr/console core:archive > /dev/null"
|
job: "/usr/bin/php /srv/http/analyse.nintendojo.fr/console core:archive > /dev/null"
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: php-fpm nextcloud specific configuration
|
- name: php-fpm nextcloud specific configuration
|
||||||
copy:
|
copy:
|
||||||
src: files/oc.conf
|
src: files/oc.conf
|
||||||
dest: "/etc/php/{{ php_version }}/fpm/pool.d/oc.conf"
|
dest: "/etc/php/{{ php_version }}/fpm/pool.d/oc.conf"
|
||||||
notify:
|
notify:
|
||||||
- restart php-fpm
|
- restart php-fpm
|
||||||
|
@@ -1,10 +1,12 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install scootaloo
|
- name: install scootaloo
|
||||||
copy:
|
copy:
|
||||||
src: files/bin/scootaloo
|
src: files/bin/scootaloo
|
||||||
dest: "{{ scootaloo_bin_path }}"
|
dest: "{{ scootaloo_bin_path }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: www-data
|
group: www-data
|
||||||
mode: 0750
|
mode: 0750
|
||||||
|
|
||||||
- name: put configuration file
|
- name: put configuration file
|
||||||
template:
|
template:
|
||||||
@@ -31,8 +33,7 @@
|
|||||||
|
|
||||||
- name: cron for scootaloo
|
- name: cron for scootaloo
|
||||||
cron:
|
cron:
|
||||||
name: Scootaloo Dojo
|
name: Scootaloo Dojo
|
||||||
user: www-data
|
user: www-data
|
||||||
minute: "*/5"
|
minute: "*/5"
|
||||||
job: "{{ scootaloo_bin_path }} > /dev/null"
|
job: "{{ scootaloo_bin_path }} > /dev/null"
|
||||||
|
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: cron for tootctl
|
- name: cron for tootctl
|
||||||
cron:
|
cron:
|
||||||
name: Mastodon tootctl
|
name: Mastodon tootctl
|
||||||
minute: "0"
|
minute: "0"
|
||||||
hour: "19"
|
hour: "19"
|
||||||
weekday: "5"
|
weekday: "5"
|
||||||
job: "COMPOSE_HTTP_TIMEOUT=360 docker-compose -f /srv/docker/m.nintendojo.fr/docker-compose.yml run --rm web bin/tootctl media remove"
|
job: "COMPOSE_HTTP_TIMEOUT=360 docker-compose -f /srv/docker/m.nintendojo.fr/docker-compose.yml run --rm web bin/tootctl media remove"
|
||||||
|
@@ -1,16 +1,17 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: systemd file for backend
|
- name: systemd file for backend
|
||||||
copy:
|
copy:
|
||||||
src: files/ttrss_backend.service
|
src: files/ttrss_backend.service
|
||||||
dest: /etc/systemd/system/ttrss_backend.service
|
dest: /etc/systemd/system/ttrss_backend.service
|
||||||
|
|
||||||
- name: enable and start service ttrss_backend
|
- name: enable and start service ttrss_backend
|
||||||
service:
|
service:
|
||||||
name: ttrss_backend
|
name: ttrss_backend
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
- name: install git
|
- name: install git
|
||||||
package:
|
package:
|
||||||
name: git
|
name: git
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
@@ -1,13 +1,15 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: nginx cache
|
- name: nginx cache
|
||||||
copy:
|
copy:
|
||||||
src: files/fastcgi_cache.conf
|
src: files/fastcgi_cache.conf
|
||||||
dest: /etc/nginx/conf.d/fastcgi_cache.conf
|
dest: /etc/nginx/conf.d/fastcgi_cache.conf
|
||||||
notify:
|
notify:
|
||||||
- restart nginx
|
- restart nginx
|
||||||
|
|
||||||
- name: wordpress cron
|
- name: wordpress cron
|
||||||
cron:
|
cron:
|
||||||
name: "WP Twitter refresh"
|
name: "WP Twitter refresh"
|
||||||
user: www-data
|
user: www-data
|
||||||
minute: "*/2"
|
minute: "*/2"
|
||||||
job: "/usr/bin/wget -q -O - https://www.nintendojo.fr/wp-cron.php &> /dev/null"
|
job: "/usr/bin/wget -q -O - https://www.nintendojo.fr/wp-cron.php &> /dev/null"
|
||||||
|
@@ -1,30 +1,32 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- 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
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: install z-push repo
|
- name: install z-push repo
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb https://download.kopano.io/zhub/z-push:/final/Debian_10/ /
|
repo: deb https://download.kopano.io/zhub/z-push:/final/Debian_10/ /
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: install z-push packages
|
- name: install z-push packages
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
loop:
|
loop:
|
||||||
- z-push-autodiscover
|
- z-push-autodiscover
|
||||||
- z-push-backend-caldav
|
- z-push-backend-caldav
|
||||||
- z-push-backend-carddav
|
- z-push-backend-carddav
|
||||||
- z-push-backend-combined
|
- z-push-backend-combined
|
||||||
- z-push-backend-imap
|
- z-push-backend-imap
|
||||||
- z-push-common
|
- z-push-common
|
||||||
- z-push-ipc-sharedmemory
|
- z-push-ipc-sharedmemory
|
||||||
- z-push-state-sql
|
- z-push-state-sql
|
||||||
|
|
||||||
- name: log directory
|
- name: log directory
|
||||||
file:
|
file:
|
||||||
path: /var/log/z-push/
|
path: /var/log/z-push/
|
||||||
owner: www-data
|
owner: www-data
|
||||||
group: www-data
|
group: www-data
|
||||||
state: directory
|
state: directory
|
||||||
|
@@ -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
|
||||||
|
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: restart prosody
|
- name: restart prosody
|
||||||
service:
|
service:
|
||||||
name: prosody
|
name: prosody
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@@ -1,10 +1,12 @@
|
|||||||
|
---
|
||||||
|
|
||||||
- name: install prosody
|
- name: install prosody
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
loop:
|
loop:
|
||||||
- prosody
|
- prosody
|
||||||
- prosody-modules
|
- prosody-modules
|
||||||
|
|
||||||
- name: create dhparam
|
- name: create dhparam
|
||||||
shell: /usr/bin/openssl dhparam -out /etc/prosody/certs/dh-2048.pem 2048
|
shell: /usr/bin/openssl dhparam -out /etc/prosody/certs/dh-2048.pem 2048
|
||||||
@@ -13,15 +15,14 @@
|
|||||||
|
|
||||||
- name: right management for dh params
|
- name: right management for dh params
|
||||||
file:
|
file:
|
||||||
path: /etc/prosody/certs/dh-2048.pem
|
path: /etc/prosody/certs/dh-2048.pem
|
||||||
owner: root
|
owner: root
|
||||||
group: prosody
|
group: prosody
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
|
|
||||||
- name: prosody configuration files
|
- name: prosody configuration files
|
||||||
copy:
|
copy:
|
||||||
src: ./files/prosody.cfg.lua
|
src: ./files/prosody.cfg.lua
|
||||||
dest: /etc/prosody/prosody.cfg.lua
|
dest: /etc/prosody/prosody.cfg.lua
|
||||||
notify:
|
notify:
|
||||||
- restart prosody
|
- restart prosody
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user