Set-OPS — moteur d'ecosystemes numeriques souverains (Alliance Boreale)

This commit is contained in:
Alliance Boreale 2026-06-24 20:17:46 -04:00
commit 3dd3f43ad8
308 changed files with 13649 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# Rôle ssh_baseline
Déploie la configuration SSH de base.

View file

@ -0,0 +1,4 @@
---
ssh_baseline_password_authentication: "no"
ssh_baseline_permit_root_login: "no"
ssh_baseline_pubkey_authentication: "yes"

View file

@ -0,0 +1,11 @@
---
- name: Valider la configuration SSH
ansible.builtin.command: sshd -t
changed_when: false
listen: Validate and reload ssh
- name: Recharger SSH
ansible.builtin.systemd:
name: ssh
state: reloaded
listen: Validate and reload ssh

View file

@ -0,0 +1,28 @@
---
- 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 Set-OPS
ansible.builtin.template:
src: 10-setops.conf.j2
dest: /etc/ssh/sshd_config.d/10-setops.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

View file

@ -0,0 +1,14 @@
# Managed by Ansible — Set-OPS
PermitRootLogin {{ ssh_baseline_permit_root_login }}
PubkeyAuthentication {{ ssh_baseline_pubkey_authentication }}
PasswordAuthentication {{ ssh_baseline_password_authentication }}
AuthenticationMethods publickey
KbdInteractiveAuthentication no
ChallengeResponseAuthentication no
PermitEmptyPasswords no
HostbasedAuthentication no
IgnoreRhosts yes
X11Forwarding no
PermitUserEnvironment no
UsePAM yes