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 other solution.


Neil Young schrieb am Dienstag, 28. September 2021 um 14:54:42 UTC+2:

>
> 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 - 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 <<EOF
>> # Kurento Media Server - Release packages
>> deb [arch=amd64] http://ubuntu.openvidu.io/6.16.0 $DISTRIB_CODENAME kms6
>> EOF
>> args:
>> executable: /bin/bash
>>
>> and in the end it is just DISTRIB_CODENAME replaced by "bionic"
>>
>> dick....@geant.org schrieb am Dienstag, 28. September 2021 um 14:49:26 
>> UTC+2:
>>
>>> 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...@googlegroups.com> wrote:
>>>
>>>> TASK [bla] 
>>>> ********************************************************************************************************************************************************************************************************
>>>> fatal: [server1]: FAILED! => {"changed": false, "msg": "Invalid 
>>>> repository string: [arch=amd64] http://ubuntu.openvidu.io/6.16.0 
>>>> bionic kms6"}
>>>>
>>>>
>>>> Neil Young schrieb am Dienstag, 28. September 2021 um 14:33:49 UTC+2:
>>>>
>>>>> 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 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.openvidu.io/6.16.0 {{ 
>>>>>> ansible_distribution_release }} kms6" 
>>>>>> filename: kurento 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, 27 Sept 2021 at 20:02, 'Neil Young' via Ansible Project 
>>>>>> <ansible...@googlegroups.com> wrote: 
>>>>>> > 
>>>>>> > 
>>>>>> > 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 <<EOF 
>>>>>> > # Kurento Media Server - Release packages 
>>>>>> > deb [arch=amd64] http://ubuntu.openvidu.io/6.16.0 
>>>>>> $DISTRIB_CODENAME kms6 
>>>>>> > EOF 
>>>>>> > args: 
>>>>>> > executable: /bin/bash 
>>>>>> > 
>>>>>> > Kudos to @Sandip 
>>>>>> > dick....@geant.org schrieb am Montag, 27. September 2021 um 
>>>>>> 19:51:58 UTC+2: 
>>>>>> >> 
>>>>>> >> On Mon, 27 Sept 2021 at 19:04, 'Neil Young' via Ansible Project 
>>>>>> >> <ansible...@googlegroups.com> 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 
>>>>>> >> GÉANT 
>>>>>> > 
>>>>>> > -- 
>>>>>> > 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-proje...@googlegroups.com. 
>>>>>> > To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/ansible-project/ebe0ad59-57b2-46e0-9802-d9dc14adb5a9n%40googlegroups.com.
>>>>>>  
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Dick Visser 
>>>>>> Trust & Identity Service Operations Manager 
>>>>>> GÉANT 
>>>>>>
>>>>> -- 
>>>> 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-proje...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/ansible-project/b2b6f8bd-ed69-49b1-853f-990d1bdbc3can%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/ansible-project/b2b6f8bd-ed69-49b1-853f-990d1bdbc3can%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>>> Sent from a mobile device - please excuse the brevity, spelling and 
>>> punctuation.
>>>
>>

-- 
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/6093ba42-65dd-4780-abda-108c3828454an%40googlegroups.com.

Reply via email to