ansible-role-customize-gnome
ansible-role-customize-gnome copied to clipboard
failing to send the list of extensions
Hi @PeterMosmans
Thanks for this role.
My slight problem (I ran this as part of an ansible-pull
): even though I use become: true
and become_method: sudo
, I get this error:
task path: /root/.ansible/roles/petermosmans.customize-gnome/tasks/main.yml:68
<dev-0> ESTABLISH LOCAL CONNECTION FOR USER: root
<dev-0> EXEC /bin/sh -c 'echo ~root && sleep 0'
<dev-0> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/tmp `"&& mkdir "` echo /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063 `" && echo ansible-tmp-1691880676.9788015-120939-9984557289063="` echo /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063 `" ) && sleep 0'
Using module file /usr/lib/python3/dist-packages/ansible/modules/command.py
<dev-0> PUT /root/.ansible/tmp/ansible-local-116227d9c21g3p/tmp2ro0r5an TO /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063/AnsiballZ_command.py
<dev-0> EXEC /bin/sh -c 'setfacl -m u:fabrice:r-x /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063/ /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063/AnsiballZ_command.py && sleep 0'
<dev-0> EXEC /bin/sh -c 'sudo -H -S -n -u fabrice /bin/sh -c '"'"'echo BECOME-SUCCESS-orkakyldcxgvzzjzbkmhohopqlhhlhmt ; /usr/bin/python3 /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063/AnsiballZ_command.py'"'"' && sleep 0'
<dev-0> EXEC /bin/sh -c 'rm -f -r /var/tmp/ansible-tmp-1691880676.9788015-120939-9984557289063/ > /dev/null 2>&1 && sleep 0'
fatal: [dev-0]: FAILED! => {
"changed": true,
"cmd": "gnome-extensions list --enabled > /tmp/before.txt",
"delta": "0:00:00.158174",
"end": "2023-08-12 23:51:17.313354",
"invocation": {
"module_args": {
"_raw_params": "gnome-extensions list --enabled > /tmp/before.txt",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": false
}
},
"msg": "non-zero return code",
"rc": 2,
"start": "2023-08-12 23:51:17.155180",
"stderr": "",
"stderr_lines": [],
"stdout": "",
"stdout_lines": []
}
Any suggestions? I tried a few things, such as:
- executing the command direstly:
23:53:06 [0] [dev-0:~]
$ gnome-extensions list --enabled > /tmp/before.txt
23:53:09 [0] [dev-0:~]
$ cat /tmp/before.txt
[email protected]
[email protected]
desktop-icons@csoriano
- I tried also cloning the role locally and creating the files before / ensuring they are absent
Non of these seems to work...any suggestion please?
Thanks
Bumping this issue @PeterMosmans.
@fabricesemti80 - Did you end up finding a solution? I've had a go at a couple of different things but it seems to be another issue somewhere.
Not sure if this is what you're looking for, but I was able to get this working here.
It allows me to get a list of extensions even when no one is logged in to one of the hosts.
Hey @lordtaytertot - thanks for that change. Would you mind creating a PR, so others can be helped here as well? Apologies if I've missed earlier remarks about that.