feat: Debian 12 compatibility
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
d8c17dad4b
commit
36c0ce1de6
9 changed files with 34 additions and 18 deletions
|
@ -349,8 +349,6 @@ List of Nagios commands.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
nagios_commands:
|
nagios_commands:
|
||||||
- command_name: check_nrpe_nossl
|
|
||||||
command_line: /usr/lib/nagios/plugins/check_nrpe -2 -H '$HOSTADDRESS$' -c '$ARG1$' -n
|
|
||||||
- command_name: check_https_vhost_certificate
|
- command_name: check_https_vhost_certificate
|
||||||
command_line: /usr/lib/nagios/plugins/check_http --ssl --sni -I '$HOSTADDRESS$' -H '$ARG1$' -C '$ARG2$'
|
command_line: /usr/lib/nagios/plugins/check_http --ssl --sni -I '$HOSTADDRESS$' -H '$ARG1$' -C '$ARG2$'
|
||||||
```
|
```
|
||||||
|
|
6
main.yml
6
main.yml
|
@ -24,6 +24,9 @@
|
||||||
- name: Configure time
|
- name: Configure time
|
||||||
ansible.builtin.include_tasks: tasks/time.yml
|
ansible.builtin.include_tasks: tasks/time.yml
|
||||||
|
|
||||||
|
- name: Configure iptables
|
||||||
|
ansible.builtin.include_tasks: tasks/iptables.yml
|
||||||
|
|
||||||
- name: Configure SSH
|
- name: Configure SSH
|
||||||
ansible.builtin.include_tasks: tasks/ssh.yml
|
ansible.builtin.include_tasks: tasks/ssh.yml
|
||||||
|
|
||||||
|
@ -48,9 +51,6 @@
|
||||||
- name: Configure bacula
|
- name: Configure bacula
|
||||||
ansible.builtin.include_tasks: tasks/bacula.yml
|
ansible.builtin.include_tasks: tasks/bacula.yml
|
||||||
|
|
||||||
- name: Configure iptables
|
|
||||||
ansible.builtin.include_tasks: tasks/iptables.yml
|
|
||||||
|
|
||||||
- name: Configure vim
|
- name: Configure vim
|
||||||
ansible.builtin.include_tasks: tasks/vim.yml
|
ansible.builtin.include_tasks: tasks/vim.yml
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Install bacula
|
- name: Install bacula
|
||||||
ansible.builtin.apt:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- bacula-director
|
- bacula-director
|
||||||
- bacula-director-sqlite3
|
- bacula-director-sqlite3
|
||||||
|
@ -56,6 +56,14 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: bacula
|
group: bacula
|
||||||
|
|
||||||
|
- name: Create configuration directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/bacula/conf.d
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
- name: Copy configuration files
|
- name: Copy configuration files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "bacula/conf.d/{{ item }}.conf.j2"
|
src: "bacula/conf.d/{{ item }}.conf.j2"
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
---
|
---
|
||||||
|
- name: Install iptables
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: iptables
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Allow related and established connections
|
- name: Allow related and established connections
|
||||||
ansible.builtin.iptables:
|
ansible.builtin.iptables:
|
||||||
chain: INPUT
|
chain: INPUT
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
---
|
---
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
ansible.builtin.apt:
|
ansible.builtin.package:
|
||||||
name:
|
name: mosquitto
|
||||||
- mosquitto
|
|
||||||
|
|
||||||
- name: Configure mosquitto
|
- name: Deploy general configuration
|
||||||
ansible.builtin.copy:
|
ansible.builtin.template:
|
||||||
src: files/mosquitto/conf.d
|
src: mosquitto/default.conf.j2
|
||||||
dest: /etc/mosquitto
|
dest: /etc/mosquitto/conf.d/default.conf
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
- name: Copy mosquitto password
|
- name: Copy mosquitto password
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: mosquitto/passwd.j2
|
src: mosquitto/passwd.j2
|
||||||
dest: /etc/mosquitto/passwd
|
dest: /etc/mosquitto/passwd
|
||||||
mode: '0600'
|
mode: '0640'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: mosquitto
|
||||||
|
|
||||||
- name: Restart mosquitto
|
- name: Restart mosquitto
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
- python3-jinja2
|
- python3-jinja2
|
||||||
- python3-requests
|
- python3-requests
|
||||||
- python3-jsonschema
|
- python3-jsonschema
|
||||||
- python-pexpect
|
- python3-pexpect
|
||||||
|
|
||||||
- name: Generate nagios configurations
|
- name: Generate nagios configurations
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -100,6 +100,7 @@
|
||||||
loop:
|
loop:
|
||||||
- auth_digest
|
- auth_digest
|
||||||
- headers
|
- headers
|
||||||
|
- cgi
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
- name: Restart apache
|
- name: Restart apache
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
- name: Install check_ovhcloud dependencies
|
- name: Install check_ovhcloud dependencies
|
||||||
ansible.builtin.pip:
|
ansible.builtin.pip:
|
||||||
requirements: /opt/check_ovhcloud/requirements.txt
|
requirements: /opt/check_ovhcloud/requirements.txt
|
||||||
extra_args: "--user"
|
extra_args: "--user --break-system-packages"
|
||||||
become: true
|
become: true
|
||||||
become_user: nagios
|
become_user: nagios
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
- name: Download influxdata APT key
|
- name: Download influxdata APT key
|
||||||
ansible.builtin.apt_key:
|
ansible.builtin.apt_key:
|
||||||
url: https://repos.influxdata.com/influxdb.key
|
url: https://repos.influxdata.com/influxdata-archive_compat.key
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Install telegraf and dependencies
|
- name: Install telegraf and dependencies
|
||||||
|
|
3
templates/mosquitto/default.conf.j2
Normal file
3
templates/mosquitto/default.conf.j2
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
allow_anonymous false
|
||||||
|
password_file /etc/mosquitto/passwd
|
Loading…
Add table
Reference in a new issue