From b98264ea7dea3dae8396176849d14ee9b4e86937 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Tue, 11 Dec 2018 18:40:49 +0100 Subject: [PATCH] Feat(Songe): mod ssh connectin policy between every body --- Songe.yml | 2 +- files/sshconfig | 2 +- tasks/ssh.yml | 2 +- vars/Songe.yml | 29 +++++++++++++++-------------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Songe.yml b/Songe.yml index 394ec3b..058f433 100644 --- a/Songe.yml +++ b/Songe.yml @@ -14,7 +14,7 @@ - include: tasks/ssh.yml - include: tasks/dotfiles.yml - include: tasks/NAS_mounts.yml - - include: tasks/borg_server.yml + # - include: tasks/borg_server.yml handlers: - name: restart sshd diff --git a/files/sshconfig b/files/sshconfig index da6e526..fed0f82 100755 --- a/files/sshconfig +++ b/files/sshconfig @@ -34,7 +34,7 @@ Host Songe Port 22 ForwardAgent yes PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_home + identityfile ~/.ssh/id_rsa_songe IdentitiesOnly yes Host Choux diff --git a/tasks/ssh.yml b/tasks/ssh.yml index db41fa5..bb29a62 100644 --- a/tasks/ssh.yml +++ b/tasks/ssh.yml @@ -25,7 +25,7 @@ - name: Add public key for deploy user authorized_key: user: "{{ item.username }}" - key: "{{ lookup('file', deploy_public_key) }}" + key: "{{ lookup('file', 'sshpubs/' + deploy_public_key) }}" state: present with_items: "{{ deploy_users }}" register: add_identity_key diff --git a/vars/Songe.yml b/vars/Songe.yml index 433d9e6..d318ab1 100644 --- a/vars/Songe.yml +++ b/vars/Songe.yml @@ -1,6 +1,7 @@ --- 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 server: true @@ -22,19 +23,19 @@ nfs_shares: ## J'en suis là!! -borg: - user: backup - password: '$6$6lmddb2/hRK5$zpz9rr./tC1oJYyw5588AXs53U0oEUPmKNUE.a6hP9fTazWRGZihvjZ722F.dfNWh2Kw6K3BDejvG78RhPN1Q0' - group: backup - home: /media/backup/borgbackup - pool: /media/backup/borgbackup/repos - auth_users: - - host: Poivre - key: "{{ lookup('file', 'sshpubs/id_rsa_poivre_borg.pub') }}" - # - host: Choux - # key: "{{ lookup('file', '') }}" - # - host: localhost - # key: "{{ lookup('file', '') }}" +# borg: +# user: backup +# password: '$6$6lmddb2/hRK5$zpz9rr./tC1oJYyw5588AXs53U0oEUPmKNUE.a6hP9fTazWRGZihvjZ722F.dfNWh2Kw6K3BDejvG78RhPN1Q0' +# group: backup +# home: /mnt/BackupWD_1T/borgbackup +# pool: /mnt/BackupWD_1T/borgbackup/repos +# auth_users: +# - host: Poivre +# key: "{{ lookup('file', 'sshpubs/id_rsa_poivre_borg.pub') }}" +# # - host: Choux +# # key: "{{ lookup('file', '') }}" +# # - host: localhost +# # key: "{{ lookup('file', '') }}"