Refs #8025 Rol debian-base. Task ssh move from debian-once to ., refactor handlers

This commit is contained in:
Xavi Lleó 2024-10-10 13:36:16 +02:00
parent 33586c7f96
commit 06cc6fa26b
6 changed files with 12 additions and 7 deletions

View File

@ -12,3 +12,7 @@ vn_host:
url: http://apt.verdnatura.es/pool/main/v/vn-host url: http://apt.verdnatura.es/pool/main/v/vn-host
package: vn-host_2.0.2_all.deb package: vn-host_2.0.2_all.deb
time_server_spain: ntp.roa.es time_server_spain: ntp.roa.es
nagios_packages:
- nagios-nrpe-server
- nagios-plugins-contrib
- monitoring-plugins-basic

View File

@ -14,6 +14,10 @@
systemd: systemd:
name: nagios-nrpe-server name: nagios-nrpe-server
state: restarted state: restarted
- name: restart sshd
systemd:
name: sshd
state: restarted
- name: generate locales - name: generate locales
command: /usr/sbin/locale-gen command: /usr/sbin/locale-gen
- name: reconfigure tzdata - name: reconfigure tzdata

View File

@ -2,6 +2,8 @@
tags: resolv tags: resolv
- import_tasks: timesync.yml - import_tasks: timesync.yml
tags: timesync tags: timesync
- import_tasks: ssh.yml
tags: ssh
- import_tasks: defuser.yml - import_tasks: defuser.yml
tags: defuser tags: defuser
- import_tasks: install.yml - import_tasks: install.yml

View File

@ -22,3 +22,4 @@
- /etc/ssh/ssh_host_ed25519_key - /etc/ssh/ssh_host_ed25519_key
- /etc/ssh/ssh_host_ed25519_key.pub - /etc/ssh/ssh_host_ed25519_key.pub
when: new_pair is succeeded when: new_pair is succeeded
notify: restart sshd

View File

@ -1,4 +0,0 @@
- name: restart sshd
systemd:
name: sshd
state: restarted

View File

@ -1,4 +1,2 @@
- import_tasks: ssh.yml
tags: ssh
- import_tasks: root.yml - import_tasks: root.yml
tags: root tags: root