From 99adda10e9c0198b55af5e09abdda9172050802e Mon Sep 17 00:00:00 2001 From: davidl Date: Tue, 29 Aug 2023 13:19:48 +0200 Subject: [PATCH] ewew --- linux/os/create_user_ssh/add_authorized_key.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux/os/create_user_ssh/add_authorized_key.yml b/linux/os/create_user_ssh/add_authorized_key.yml index 6efe9b9..3d95ce7 100644 --- a/linux/os/create_user_ssh/add_authorized_key.yml +++ b/linux/os/create_user_ssh/add_authorized_key.yml @@ -1,10 +1,12 @@ --- -- hosts: "{{ host }}" +- hosts: "{{ hosts_servers }}" gather_facts: no + vars: + key_to_add: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDXzZ9SOKE/2uuXEeiFmOyYG0qR0thjjfxylJxURFoXE2SnUqJI3ZPac2f3KK4fScHKpAnFL4OARHi8cLFI3Uwcn40GEvRBArmUrNnPdCIWk2YH8GYNNfbQkWfcXxOAwHsM7XMgiZ7PAp0nG4u2aO+1GWOTkczBaVZ53mIlSUXnfo+EYUMwheixBydHDSYmOU7JHEw5YggXt0wds0fbzVk1bT++EAIS705m/14AcpGpeJgWpviCLzkfJNe7sbyuQdTVuP2pP7KN/NgmQQPZdniKbYIf+wz3TfkHRTNtg+N86C48aWfTfRncHgFQI4tQnCFWxrbydRJL0lpg2sRqYXrXNGLRzofLJRtx5yP4F2G0R9XBBnA/WknqjiLw4DKC73tAkqSPTciIHqBsjNo0wI15fu63TGQz8hKDecqJOso5tTpSlofTdRtvgCaLLMogS4uUmj4QZYpQ+9SRBeS33CLD4DUUN8Oc7V5f3EK4/GZKfuBHAne1tfDZN0A5UKieyfE= awx@awx.verdnatura.es tasks: - - name: Create user with hash + - name: Create user awx user: name: awx state: present @@ -12,7 +14,7 @@ - name: Add ssh pub keys AWX authorized_key: user: awx - key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDXzZ9SOKE/2uuXEeiFmOyYG0qR0thjjfxylJxURFoXE2SnUqJI3ZPac2f3KK4fScHKpAnFL4OARHi8cLFI3Uwcn40GEvRBArmUrNnPdCIWk2YH8GYNNfbQkWfcXxOAwHsM7XMgiZ7PAp0nG4u2aO+1GWOTkczBaVZ53mIlSUXnfo+EYUMwheixBydHDSYmOU7JHEw5YggXt0wds0fbzVk1bT++EAIS705m/14AcpGpeJgWpviCLzkfJNe7sbyuQdTVuP2pP7KN/NgmQQPZdniKbYIf+wz3TfkHRTNtg+N86C48aWfTfRncHgFQI4tQnCFWxrbydRJL0lpg2sRqYXrXNGLRzofLJRtx5yP4F2G0R9XBBnA/WknqjiLw4DKC73tAkqSPTciIHqBsjNo0wI15fu63TGQz8hKDecqJOso5tTpSlofTdRtvgCaLLMogS4uUmj4QZYpQ+9SRBeS33CLD4DUUN8Oc7V5f3EK4/GZKfuBHAne1tfDZN0A5UKieyfE= awx@awx.verdnatura.es + key: "{{ key_to_add }}" state: present manage_dir: yes