Hi Martin,
that is what I was looking for.
Thank you.
starflighter
Am Mittwoch, 12. Juni 2019 14:13:58 UTC+2 schrieb starflighter one:
>
> Hi all,
>
> how can I write with_first_found as loop?
>
> I can't find an example at
> https://docs.ansible.com/ansible
Hi all,
how can I write with_first_found as loop?
I can't find an example at
https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.5.html#migrating-from-with-x-to-loop
Can you give me an example?
Thanks,
starflighter
--
You received this message because you are subscribed
I solved it myself:
> - group_by:
> key:
> "dist_{{ansible_distribution.lower()}}-{{ansible_distribution_major_version}}"
>
> - name: Hostname der Server pro Distribution
> debug: var="groups['{{ item }}']"
> with_items: "{{ groups.keys()|select('match', 'dist_.*')|list }}"
>
Any Updates here? :-(
I still need something like this...
Am Dienstag, 12. Dezember 2017 10:39:45 UTC+1 schrieb
starflig...@t-online.de:
>
> Hi guys,
>
> I want to get all existent subgroups from a parent group.
>
> Example Playbook:
>
> ---
> - hosts: "test"
>
> tasks:
> - group_by:
>
Hi,
here are the official examples:
https://github.com/ansible/ansible-examples/tree/master/language_features
There are also templates.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving
Hi guys,
I want to get all existent subgroups from a parent group.
Example Playbook:
---
- hosts: "test"
tasks:
- group_by:
key: "{{ansible_distribution}}-{{ansible_distribution_major_version}}"
parents: "dist"
- debug: var="{{ groups['dist'] }}"
run_once: true