Compare commits

...

3 Commits

Author SHA1 Message Date
root
91d8b57029 modif role 2024-01-25 10:10:50 +01:00
root
37bbbad9dd script recup cle pub 2024-01-25 10:03:20 +01:00
root
84215f502b generate cle publique et privee 2024-01-25 09:53:45 +01:00
6 changed files with 54 additions and 0 deletions

25
goss.yaml Normal file
View File

@@ -0,0 +1,25 @@
port:
tcp:22:
listening: true
ip:
- 0.0.0.0
tcp6:22:
listening: true
ip:
- '::'
service:
sshd:
enabled: true
running: true
user:
sshd:
exists: true
uid: 101
gid: 65534
groups:
- nogroup
home: /run/sshd
shell: /usr/sbin/nologin
process:
sshd:
running: true

View File

@@ -0,0 +1 @@
###Génération de clé publique et privée###

View File

@@ -0,0 +1,20 @@
---
- name: on genere une cle privee pour s-backup
openssh_keypair:
path: /root/id_rsa_sbackup
type: rsa
state: present
- name: copie cle publique dans gsbstore
copy:
src: /root/id_rsa_sbackup.pub
dest: /var/www/html/gsbstore
mode: 0644
remote_src: yes
- name: copie cle privee dans gsbstore
copy:
src: /root/id_rsa_sbackup
dest: /var/www/html/gsbstore
mode: 0600
remote_src: yes

View File

@@ -0,0 +1,6 @@
---
- name: recuperation de la cle publique generee par s-adm
ansible.posix.authorized_key:
user: root
state: present
key: http://s-adm.gsb.adm/gsbstore/id_rsa_sbackup.pub

View File

@@ -7,6 +7,7 @@
- s-ssh
- dnsmasq
- squid
- ssh-backup-key-gen
# - local-store
- zabbix-cli
## - syslog-cli

View File

@@ -10,3 +10,4 @@
# - syslog-cli
- snmp-agent
- post
- ssh-backup-key-pub