source is a bash built-in command. There is no executable. You can try "bash -c 'source /etc/lsb-release' "

HTH,
  Sandip


On 27.09.21 19:04, 'Neil Young' via Ansible Project wrote:
Hi,

I'm banging my head trying to make this simple statement work:

- name: Get Ubuntu version definitions
  ansible.builtin.shell: source /etc/lsb-release

But whatever I do I get this:

TASK [Get Ubuntu version definitions] ****************************************************************************************************************

fatal: [server1]: FAILED! => {"changed": true, "cmd": "source /etc/lsb-release", "delta": "0:00:00.002579", "end": "2021-09-27 17:02:32.565396", "msg": "non-zero return code", "rc": 127, "start": "2021-09-27 17:02:32.562817", "stderr": "/bin/sh: 1: source: not found", "stderr_lines": ["/bin/sh: 1: source: not found"], "stdout": "", "stdout_lines": []}


This is most likely because I run at elevated permissions.

What can I do in order to make this work?

TIA

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fe78c00b-ac97-4960-a70b-449b0e1fcf41n%40googlegroups.com <https://groups.google.com/d/msgid/ansible-project/fe78c00b-ac97-4960-a70b-449b0e1fcf41n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
https://blog.sandipb.net
https://twitter.com/sandipb

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1fe79e0d-7e1c-8353-91ca-c7e0f1bcfada%40showmethesource.org.

Reply via email to