Browse Source

ajout d'un playbook pour déployer une clé ssh sur les serveurs

SiM 5 years ago
parent
commit
7d0f20807d
1 changed files with 9 additions and 0 deletions
  1. 9 0
      playbooks/add-ssh-key.yml

+ 9 - 0
playbooks/add-ssh-key.yml

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