What task are you trying to perform eventually? If it’s something like adding a new package, you may need to connect with the normal wildfly user first and then become root. If so, something like similar might be more appropriate:
- name: Test hosts: all remote_user: wildfly become: yes become_method: sudo Regards Phil From: [email protected] <[email protected]> On Behalf Of [email protected] Sent: 27 June 2019 15:55 To: Ansible Project <[email protected]> Subject: Re: [ansible-project] Ansible .ssh/authorized.key Hy, I check it and all is ok but not works... When i changed permission 777 it's works. I thinks that it's problem of user use ? but i have the well user ... with this command: become_user: wildfly Thinks, Regards, Le jeudi 27 juin 2019 15:12:19 UTC+2, [email protected]<mailto:[email protected]> a écrit : Have you checked permissions on /home/wildfly/.ssh/ too? That needs to be 700 (rwx) – see eg below: [root@<server>]# ls -ld /home/wildfly/.ssh drwx------. 2 wildfly wildfly 4096 Jun 7 14:26 /home/ wildfly /.ssh [root@<server>]# Regards Phil From: [email protected]<javascript:> <[email protected]<javascript:>> On Behalf Of [email protected]<javascript:> Sent: 27 June 2019 13:56 To: Ansible Project <[email protected]<javascript:>> Subject: Re: [ansible-project] Ansible .ssh/authorized.key Hy, For answer, i have this permissions for authorized_keys with user wildfly : -rw------- 1 wildfly wildfly 7445 Jun 27 12:05 authorized_keys Thanks, Regards, Le jeudi 27 juin 2019 14:18:41 UTC+2, new_ansible a écrit : May check permissions of authorized_keys On Thu, 27 Jun 2019 at 17:46, Ryad karkar <[email protected]<mailto:[email protected]>> wrote: Hy all, when i use become_user: wildfly i have have this message error : path /home/wildfly/.ssh/authorized_keys does not exist But this path exist in destination host... Someone have idea please ??! Thanks community ansible for your help !! ;) ansible version : 2.8 Regards, -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b495f189-4576-4e3c-be88-de04b2a6674c%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/b495f189-4576-4e3c-be88-de04b2a6674c%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<javascript:>. To post to this group, send email to [email protected]<javascript:>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5c7b7143-53af-4ad7-b7d4-e8efff8c1aa8%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/5c7b7143-53af-4ad7-b7d4-e8efff8c1aa8%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To post to this group, send email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ca3ca887-43f9-4491-bc57-fb9730678049%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/ca3ca887-43f9-4491-bc57-fb9730678049%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/933de53b87dd475d897b809293e868ae%40bham.ac.uk. For more options, visit https://groups.google.com/d/optout.
