Open gsg-git opened 9 months ago
I have been told to open the issue here from the regular AWX Git: https://github.com/ansible/awx/issues/14883
This is where I asked you to file the issue originally. But, as we previously discussed, your claim is not reproducible (so it's probably a mistake on your end testing, rather than a bug in the module). From https://forum.ansible.com/t/default-code-to-add-public-ssh-key-fails/3702/37:
If you open an issue at Issues · ansible-collections/ansible.posix · GitHub 1 please be sure to include a simple generic reproducer, the full output with -vvv, and the commands you’re running that prove the module didn’t do what it claimed. I wasn’t able to reproduce the issue.
What commands are you running that make you think it's a false positive? From tracing the module just now I am quite sure it's not a bug, but please correct me.
Please confirm the following
security@ansible.com
instead.)Bug Summary
My playbook gets marked as successfully executed, but there are no entrys in any authorized_keys files. After trying to set a custom path where the content of the public key gets added the playbook did add the line in the custom path. Then i tried my (default?) path at /root/.ssh/authorized_keys and the key got added there too. I got requested to report the bug from the Ansible forum: https://forum.ansible.com/t/default-code-to-add-public-ssh-key-fails/3702/34
AWX version
AWX 23.6.0
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
Ubuntu server 22
Web browser
No response
Steps to reproduce
`---
name: Set authorized keys hosts: all gather_facts: false vars: key_url: "https://raw.githubusercontent.com/gsg-git/awx_pub/main/awxtestpub" key_content: "{{ lookup('url', key_url, split_lines=false) }}" conversion_cmd: 'ssh-keygen -i -m RFC4716 -f /dev/stdin <<<"{{ key_content }}"' new_key_content: "{{ lookup('pipe', conversion_cmd) }}"
tasks:
Here i have to add at the end:
path: /root/.ssh/authorized_keys`Expected results
Adding the ssh key at the default location without further config
Actual results
i have to add the path even the default ones.
Additional information
Links for the successfull job log: https://github.com/gsg-git/awx_pub/blob/main/job_237.txt link for the false positive log where nothing gets entered: https://github.com/gsg-git/awx_pub/blob/main/job_263-falsepositive.txt