Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing to send the list of extensions #32

Open
fabricesemti80 opened this issue Aug 12, 2023 · 3 comments
Open

failing to send the list of extensions #32

fabricesemti80 opened this issue Aug 12, 2023 · 3 comments

Comments

@fabricesemti80
Copy link

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
ubuntu-dock@ubuntu.com
ubuntu-appindicators@ubuntu.com
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

@rainyskye
Copy link

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.

@lordtaytertot
Copy link
Contributor

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.

@PeterMosmans
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants