Open AlexanderNtk opened 1 year ago
@AlexanderNtk Did you ever find an answer to this one? I can't even get a single task to become 'root' once SSM'd into a host: it just remains as 'ssm-user'. This is with stating 'become: true:' and 'become_user: root'.
Is there any update on this, this is a show stopper for us here as well
@vikas-falconx I don't know if this helps you, but in my case I'm using AWX and found the 'solution'.
I needed to create a machine credential for the job template with the username of 'admin' and no password required. This then allowed 'become' to work. Without that, become would not cause any changes to user after SSM connection. Quite annoying..
Summary
community.aws.aws_ssm do not change user to ubuntu. It successfully change user to root, www-data, nobody. In logs clearly visible that it does not apply sudo -u ubuntu as It should.
Issue Type
Bug Report
Component Name
community.aws.aws_ssm
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Operating System: Ubuntu 22.04.3 LTS Kernel: Linux 5.19.0-1025-aws Architecture: x86-64
Steps to Reproduce
Expected Results
TASK [Test 1] ** changed: [sentry_1] => { "changed": true, "cmd": [ "whoami" ], "delta": "0:00:00.004309", "end": "2023-10-24 14:03:28.813178", "invocation": { "module_args": { "_raw_params": "whoami", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true } }, "msg": "", "rc": 0, "start": "2023-10-24 14:03:28.808869", "stderr": "", "stderr_lines": [], "stdout": "ssm-user", "stdout_lines": [ "ubuntu" ] }
Actual Results
Code of Conduct