This repository has been archived on 2026-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
Set-OPS/roles/ssh_baseline/tasks/main.yml

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