Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread 'Neil Young' via Ansible Project
Have it. "deb" was missing in the string: - name: Install Kurento Media Server ansible.builtin.apt_repository: repo: "deb [arch=amd64] http://ubuntu.openvidu.io/6.16.0 bionic kms6" filename: kurento Worx Neil Young schrieb am Dienstag, 28. September 2021 um 14:56:59 UTC+2: > Hmm. No. Forget

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread 'Neil Young' via Ansible Project
Hmm. No. Forget about my last comment. It renders "bionic", but even if I hardcode "bionic" the error is: fatal: [server1]: FAILED! => {"changed": false, "msg": "Invalid repository string: [arch=amd64] http://ubuntu.openvidu.io/6.16.0 bionic kms6"} Anyway, disregard please. I'm fine with the ot

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread 'Neil Young' via Ansible Project
Seems, {{ansible_distribution_release }}} rendes "Releasebionic", which is not ok in this case Neil Young schrieb am Dienstag, 28. September 2021 um 14:51:12 UTC+2: > Sorry, responded on another thread. These groups are ugly. > > Well, this works: > > - name: Install Kurento Media Server - G

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread 'Neil Young' via Ansible Project
Sorry, responded on another thread. These groups are ugly. Well, this works: - name: Install Kurento Media Server - Get Ubuntu version definitions and add repository to apt ansible.builtin.shell: | source /etc/lsb-release tee "/etc/apt/sources.list.d/kurento.list" >/dev/null

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread Dick Visser
Find out what it should be and adjust the repo value On Tue, 28 Sep 2021 at 14:41, 'Neil Young' via Ansible Project < ansible-project@googlegroups.com> wrote: > TASK [bla] > ***

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread 'Neil Young' via Ansible Project
TASK [bla] fatal: [server1]: FAILED! => {"changed": false, "msg": "Invalid repository string: [a

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-28 Thread 'Neil Young' via Ansible Project
This does not work for me. - ansible.builtin.apt_repository: repo: "[arch=amd64] http://ubuntu.openvidu.io/6.16.0 {{ ansible_distribution_release }} kms6" filename: kurento dick@geant.org schrieb am Montag, 27. September 2021 um 20:14:07 UTC+2: > The information you are looking for is alrea

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Dick Visser
The information you are looking for is already available when the fact gathering is done. No need for kludgy shell pipes/source/tee/etc. Also there is a dedicated module for what you want. Just 3 lines should be enough: - ansible.builtin.apt_repository: repo: "[arch=amd64] http://ubuntu.openv

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread 'Neil Young' via Ansible Project
Hmm. Was posting the solution already, but it doesn't appear here... OK, @Sandip solved it: - name: Install Kurento Media Server - Get Ubuntu version definitions and add repository to apt ansible.builtin.shell: | source /etc/lsb-release tee "/etc/apt/sources.list.d/kurento.list" >/dev/null

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Dick Visser
On Mon, 27 Sept 2021 at 19:04, 'Neil Young' via Ansible Project wrote: > - name: Get Ubuntu version definitions > ansible.builtin.shell: source /etc/lsb-release What is the purpose of this task? I.e. What are you trying to achieve? -- Dick Visser Trust & Identity Service Operations Manager

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Sandip Bhattacharya
This won't work for you? $ sudo bash -c 'source /etc/lsb-release; echo $DISTRIB_CODENAME' focal On 27.09.21 19:14, 'Neil Young' via Ansible Project wrote: Exactly. which source gives nothing. If I run the command at non-elevated level I get useful results and the environment is filled sou

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread 'Neil Young' via Ansible Project
Exactly. which source gives nothing. If I run the command at non-elevated level I get useful results and the environment is filled source /etc/lsb-release echo $DISTRIB_CODENAME bionic sudo source /etc/lsb-release [sudo] password for ubuntu: sudo: source: command not found So it is a mat

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Sandip Bhattacharya
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   a

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread harry devine
You should use the full path to the source executable. "which source" should give you that. Harry On Mon, Sep 27, 2021, 1:04 PM 'Neil Young' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi, > > I'm banging my head trying to make this simple statement work: > > - name: Get Ubu

[ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread 'Neil Young' via Ansible Project
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] **