mise au point

This commit is contained in:
2022-05-06 14:16:47 +02:00
parent 8dbf7e2d9e
commit 0dc0373c85
9 changed files with 23 additions and 98 deletions

View File

@@ -1,6 +1,6 @@
---
- name: install certbot
yum:
package:
name: certbot
state: present
@@ -43,4 +43,4 @@
hour: "01"
minute: "00"
weekday: "6"
job: "/usr/bin/certbot renew && /sbin/apachectl graceful"
job: "/usr/bin/certbot renew"

View File

@@ -1,15 +0,0 @@
---
- name: create database
community.mysql.mysql_db:
login_user: root
name: "{{ apache_db_name }}"
state: present
- name: create db user
community.mysql.mysql_user:
name: "{{ apache_db_user }}"
password: "{{ apache_db_password }}"
update_password: on_create
priv: "{{ apache_db_name }}.*:ALL"
state: present

View File

@@ -23,13 +23,6 @@
shell: /bin/bash
when: apache_user_password is defined
- name: php-fpm config file
template:
src: pool.conf.jj
dest: /etc/opt/remi/php73/php-fpm.d/{{ apache_server_name }}.conf
notify: restart php-fpm
when: apache_use_php
- name: create directories
file:
path: "{{ item }}"
@@ -48,36 +41,20 @@
include_tasks: dns.yml
when: apache_use_dns
- name: generate cert
import_tasks: certbot.yml
when: apache_use_certbot
tags: certbot,ssl
- name: vhost config file
template:
src: vhost.conf.jj
dest: /etc/httpd/conf.d/{{ apache_server_name }}.conf
mode: 0644
notify: restart apache
when: apache_update_conf
- name: logrotate config file
template:
src: logrotate.conf.jj
dest: "/etc/logrotate.d/vhost.conf"
dest: "/etc/logrotate.d/vhost_{{ apache_server_name }}.conf"
mode: 0644
- name: goaccess
import_tasks: goaccess.yml
when: apache_use_stats
tags: stats
- name: zabbix setup
import_tasks: zabbix.yml
when: apache_use_zabbix|bool
tags: zabbix, ssl
- name: db setup
import_tasks: db.yml
when: apache_use_database
tags: db
tags: stats

View File

@@ -1,13 +0,0 @@
---
- name: deploy zabbix lld script
copy:
src: lld_certlist.py
dest: /etc/zabbix/scripts
group: zabbix
mode: 0750
- name: deploy zabbix userparameter
copy:
dest: /etc/zabbix/zabbix_agentd.d/user_parameter_certificate_discovery.conf
content: "UserParameter=certificate.discovery,/etc/zabbix/scripts/lld_certlist.py"
notify: restart zabbix_agentd