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
package: vn-host_2.0.2_all.deb
time_server_spain: ntp.roa.es
nagios_packages:
- nagios-nrpe-server
- nagios-plugins-contrib
- monitoring-plugins-basic

View File

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

View File

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

View File

@ -3,7 +3,7 @@
path: /etc/ssh/ssh_host_rsa_key
type: rsa
size: 4096
register: new_pair
register: new_pair
- name: Configure sshd_config settings
lineinfile:
path: /etc/ssh/sshd_config
@ -22,3 +22,4 @@
- /etc/ssh/ssh_host_ed25519_key
- /etc/ssh/ssh_host_ed25519_key.pub
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
tags: root