Browse Source

vm with yunohost now authorize only ssh trough admin user

SiM 4 years ago
parent
commit
865a6d2689
1 changed files with 10 additions and 2 deletions
  1. 10 2
      playbooks/add-ssh-key.yml

+ 10 - 2
playbooks/add-ssh-key.yml

@@ -1,9 +1,17 @@
 # Déployer une clé ssh sur tous les serveurs
 ---
-- hosts: all
+- hosts: tera-host:tera-dev:tera-prod
   tasks:
      - name: Set authorized key taken from file
        authorized_key:
          user: root
          state: present
-         key: "{{ lookup('file', '/tmp/id_rsa.pub') }}"
+         key: "{{ lookup('file', '/tmp/add_id_rsa.pub') }}"
+
+- hosts: tera-dev-agora:tera-prod-agora
+  tasks:
+     - name: Set authorized key taken from file
+       authorized_key:
+         user: admin
+         state: present
+         key: "{{ lookup('file', '/tmp/add_id_rsa.pub') }}"