This is not possible.
Also, why would you want to 'nest' the packages?
On Mon, 23 May 2022 at 18:43, dulhaver via Ansible Project <
[email protected]> wrote:
> I want to to install some packages to several almalinux hosts
>
> - name: "docker=install"
> delegate_to: "{{ item }}"
> dnf:
> name:
> - '
> https://download.docker.com/linux/rhel/8/source/stable/Packages/docker-ce-20.10.15-3.el8.src.rpm
> '
> - yum-utils
> - device-mapper-persistent-data
> - lvm2
> state: present
> loop:
> - k8s-master
> - k8s-node-1
>
> this TASK works, but I was thinking whether I could put the packages into
> a loop also (which would result into 2 loops in one TASK)
> Can this be done? If so ... 'how'?
>
> I tried to nest it like this
>
> - name: "docker=install"
> delegate_to: "{{ item }}"
> dnf:
> name: "{{ item }}"
> state: present
> loop:
> - '
> https://download.docker.com/linux/rhel/8/source/stable/Packages/docker-ce-20.10.15-3.el8.src.rpm
> '
> - yum-utils
> - device-mapper-persistent-data
> - lvm2
> loop:
> - k8s-master
> - k8s-node-1
>
> but execution failed with an *"unsupported paramter for dnf module: loop"*
> error
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/749db923-40f4-f9c8-9dfc-9ea0e81ea216%40mailbox.org
> <https://groups.google.com/d/msgid/ansible-project/749db923-40f4-f9c8-9dfc-9ea0e81ea216%40mailbox.org?utm_medium=email&utm_source=footer>
> .
>
--
Sent from Gmail Mobile
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAF8BbLZvw%3DvDoeH_wO7OamxwRgaD3KHcwVFwH8_83kgr1oBqjw%40mail.gmail.com.