Many thank, works!!!

Because not work with --extra-vars?

Regards


El jueves, 28 de septiembre de 2023 a las 18:09:18 UTC+2, Will McDonald 
escribió:

> Could you use the environment variable ANSIBLE_NMAP_ADDRESS as documented 
> below as an alternative?
>
>
> https://docs.ansible.com/ansible/latest/collections/community/general/nmap_inventory.html#parameter-address
>
> https://docs.ansible.com/ansible/latest/collections/environment_variables.html#envvar-ANSIBLE_NMAP_ADDRESS
>
>
> On Thu, 28 Sept 2023 at 16:56, J M <[email protected]> wrote:
>
>> Hi,
>>
>> I have a question of howto use external variables in the nmap plugin.
>>
>> I have a simple yml:
>> plugin: nmap
>> address: 192.168.10.0/24
>> ...
>>
>> But I need to pass the network range as a external variable, as example:
>> plugin: nmap
>> address: '{{ mynetrange }}'
>> # I tested this argument also:
>> use_extra_vars: true
>> ...
>>
>> And launch as:
>> ansible-inventory -i nmap.yml --list -e "mynetrange=192.168.10.0/24"
>>
>> but I can't get it to work, someone could help me?
>>
>>
>> Regards
>>
>> -- 
>> 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/5b1c9c10-08cb-4cc3-a8eb-747cedbac6d1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/5b1c9c10-08cb-4cc3-a8eb-747cedbac6d1n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/b8189b91-1a39-4674-ad47-f8e3b9cdd900n%40googlegroups.com.

Reply via email to