Open ELLIOTTCABLE opened 1 year ago
Huh. Ran into this again, in an unrelated situation, two months later. Same error, basically; again with acl
installed:
TASK [professormanhattan.deno : Ensure custom facts directory exists] **********
fatal: [eurydice.somewhere]: FAILED! =>
msg: |-
Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: ‘A+user:{{ ansible_user if ansible_os_family == 'Windows' else omit }}:rx:allow’
Try 'chmod --help' for more information.
}). For information on working around this, see https://docs.ansible.com/ansible-core/2.14/user_guide/become.html#risks-of-becoming-an-unprivileged-user
This is confusing, because the README says:
The role handles the become behavior so you can simply add the role to your playbook without having to worry about commands that should not be run as root.
Just to call attention to it, it looks like some become_user
value somewhere is set incorrectly, such that template substitution isn't functioning:
err: chmod: invalid mode: ‘A+user:{{ ansible_user if ansible_os_family == 'Windows' else omit }}:rx:allow’
Also, it tries to pass the same argument to setfacl
, hahaha — earlier in the log, with -vvv
enabled:
<eurydice.sth> ESTABLISH SSH CONNECTION FOR USER: None
<eurydice.sth> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s \
-o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey \
-o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/Users/ec/.ansible/cp/861003508c"' eurydice.sth \
'/bin/sh -c \
'"'"'setfacl -m '"'"'"'"'"'"'"'"'u:{{ ansible_user if ansible_os_family == '"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'Windows'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"' else omit }}:r-x'"'"'"'"'"'"'"'"' /var/tmp/ansible-tmp-1688151355.624567-7202-71179258779996/ /var/tmp/ansible-tmp-1688151355.624567-7202-71179258779996/AnsiballZ_file.py && sleep 0'"'"''
<eurydice.sth> (2, b'', b'setfacl: Option -m: Invalid argument near character 3\n')
<eurydice.sth> Failed to connect to the host via ssh: setfacl: Option -m: Invalid argument near character 3
Hi Guys,
Solution applied in 'execution-environment.yml'
Since it is Windows access, the user is Administrator or another windows account (no exist in EE container), causing a problem in the artifacts' tmp file.
If you activate the debugging level 5 (winrm), you will notice a setfacl message passing the Administrator user, as it is localhost (delegate_to: localhost), this user does not exist in podman.
append in file: execution-environment.yml
additional_build_steps: prepend: | RUN useradd -r my_windows_another_user_name RUN useradd -r Administrator append:
❔ What are you experiencing an issue with?
Latest Release
❔ Version
v2.3.0
🐞 Description
Attempting to run the
professormanhattan.deno
role, without arguments or other roles, resulted in this error-message:… reading some docs, and doing some Googling, I tried the following:
turning on root-login, and switching my inventory to instruct the playbook to run as
root
— the error changed to this, but still occurs:Adding the
aisbergg.acl
to ensuresetfacl
exists (now it does), but still the same error;Configuring ansible to use a different
remote_tmp = /tmp/.ansible/tmp
directory, still the same error.⏺️ Steps To Reproduce
📒 Relevant Log Output
💡 Possible Solution
No response