28 lines
630 B
YAML
28 lines
630 B
YAML
---
|
|
- name: Installer openssh-server
|
|
ansible.builtin.apt:
|
|
name: openssh-server
|
|
state: present
|
|
|
|
- name: Créer le répertoire sshd_config.d
|
|
ansible.builtin.file:
|
|
path: /etc/ssh/sshd_config.d
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Déployer la configuration SSH Chezlepro
|
|
ansible.builtin.template:
|
|
src: 10-chezlepro.conf.j2
|
|
dest: /etc/ssh/sshd_config.d/10-chezlepro.conf
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify: Validate and reload ssh
|
|
|
|
- name: Activer et démarrer SSH
|
|
ansible.builtin.systemd:
|
|
name: ssh
|
|
enabled: true
|
|
state: started
|