You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that AWX is open source software provided for free and that I might not receive a timely response.
I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] 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
name: Set authorized keys taken from url
ansible.posix.authorized_key:
user: root
state: present
key: "{{ new_key_content }}" 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
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
[email protected]
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:
ansible.posix.authorized_key:
user: root
state: present
key: "{{ new_key_content }}"
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
The text was updated successfully, but these errors were encountered: