On 2/13/20 1:34 PM, Matthias Steffens wrote:
> 
> 
> Am Mittwoch, 12. Februar 2020 23:46:21 UTC+1 schrieb Vladimir Botka:
> 
>     On Wed, 12 Feb 2020 13:00:55 -0800 (PST)
>     Matthias Steffens <[email protected] <javascript:>> wrote:
> 
>     > I'm looking for an method by which I can have a look on all of my
>     > 'Ansible-Clients' for an specific IP-Address.
> 
>     Try this
> 
>     - hosts: all
>       gather_facts: true
>       tasks:
>         - debug:
>             var: ansible_all_ipv4_addresses
> 
>     HTH,
> 
>             -vlado
> 
> 
> Hi vlado,
> 
> thanks for your reply. But I'm looking for an method to grep for an 
> Ip-address which is set in any configuration file on
> every of my  'Ansible-Clients.
> 
> Do you also have an idea how I can configure this with Ansible?

Hello Matthias,

it is unclear what you want to achieve with these ip addresses, but you can get 
a list of the configuration files with
the find module. Than you can use the command module to retrieve IP addresses 
with Unix grep command.

Be aware that you likely need regular expressions for both IPv4 and IPv6 
adresses. Also you probably get false positives.

Regards
       Racke

> 
> Regards,
> 
> Matthias
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/5ea08527-3526-4efe-ac72-0dac1a09ddce%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/5ea08527-3526-4efe-ac72-0dac1a09ddce%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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/be0decf8-9f10-82a0-857b-172caa8927a9%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to