generate cle publique et privee
This commit is contained in:
parent
2606cd19b0
commit
84215f502b
25
goss.yaml
Normal file
25
goss.yaml
Normal 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
|
1
roles/ssh-backup-key-gen/README.md
Normal file
1
roles/ssh-backup-key-gen/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
###Génération de clé publique et privée###
|
20
roles/ssh-backup-key-gen/tasks/main.yml
Normal file
20
roles/ssh-backup-key-gen/tasks/main.yml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user