Feat(Songe): mod ssh connectin policy between every body

This commit is contained in:
Bertrand Benjamin 2018-12-11 18:40:49 +01:00
parent 0dcf383e3b
commit b98264ea7d
4 changed files with 18 additions and 17 deletions

View File

@ -14,7 +14,7 @@
- include: tasks/ssh.yml - include: tasks/ssh.yml
- include: tasks/dotfiles.yml - include: tasks/dotfiles.yml
- include: tasks/NAS_mounts.yml - include: tasks/NAS_mounts.yml
- include: tasks/borg_server.yml # - include: tasks/borg_server.yml
handlers: handlers:
- name: restart sshd - name: restart sshd

View File

@ -34,7 +34,7 @@ Host Songe
Port 22 Port 22
ForwardAgent yes ForwardAgent yes
PubkeyAcceptedKeyTypes * PubkeyAcceptedKeyTypes *
identityfile ~/.ssh/id_ed25519_home identityfile ~/.ssh/id_rsa_songe
IdentitiesOnly yes IdentitiesOnly yes
Host Choux Host Choux

View File

@ -25,7 +25,7 @@
- name: Add public key for deploy user - name: Add public key for deploy user
authorized_key: authorized_key:
user: "{{ item.username }}" user: "{{ item.username }}"
key: "{{ lookup('file', deploy_public_key) }}" key: "{{ lookup('file', 'sshpubs/' + deploy_public_key) }}"
state: present state: present
with_items: "{{ deploy_users }}" with_items: "{{ deploy_users }}"
register: add_identity_key register: add_identity_key

View File

@ -1,6 +1,7 @@
--- ---
me: "{{ deploy_users }}" me: "{{ deploy_users }}"
deploy_public_key: files/id_ed25519_home.pub # deploy_public_key: files/id_ed25519_home.pub
deploy_public_key: files/id_rsa_songe.pub
minimal: true minimal: true
server: true server: true
@ -22,19 +23,19 @@ nfs_shares:
## J'en suis là!! ## J'en suis là!!
borg: # borg:
user: backup # user: backup
password: '$6$6lmddb2/hRK5$zpz9rr./tC1oJYyw5588AXs53U0oEUPmKNUE.a6hP9fTazWRGZihvjZ722F.dfNWh2Kw6K3BDejvG78RhPN1Q0' # password: '$6$6lmddb2/hRK5$zpz9rr./tC1oJYyw5588AXs53U0oEUPmKNUE.a6hP9fTazWRGZihvjZ722F.dfNWh2Kw6K3BDejvG78RhPN1Q0'
group: backup # group: backup
home: /media/backup/borgbackup # home: /mnt/BackupWD_1T/borgbackup
pool: /media/backup/borgbackup/repos # pool: /mnt/BackupWD_1T/borgbackup/repos
auth_users: # auth_users:
- host: Poivre # - host: Poivre
key: "{{ lookup('file', 'sshpubs/id_rsa_poivre_borg.pub') }}" # key: "{{ lookup('file', 'sshpubs/id_rsa_poivre_borg.pub') }}"
# - host: Choux # # - host: Choux
# key: "{{ lookup('file', '') }}" # # key: "{{ lookup('file', '') }}"
# - host: localhost # # - host: localhost
# key: "{{ lookup('file', '') }}" # # key: "{{ lookup('file', '') }}"