Closed steevivo closed 5 years ago
Hi,
I would like to know if is it possible to use my Floating IP in my "hosts" file and not the private IPV4 address with ansible_default_ipv4, what is the best way for that ?
PS : I'm using API for create host with the module zabbix_host
Thanks
Hi @steevivo
Does something like this work for you:
- name: "Get IP Server" shell: grep $(hostname) /etc/hosts | awk '{ print $1 }' | tail -n 1 register: ip_address
?
Hi, Some testing..
Thx
Hi,
I would like to know if is it possible to use my Floating IP in my "hosts" file and not the private IPV4 address with ansible_default_ipv4, what is the best way for that ?
PS : I'm using API for create host with the module zabbix_host
Thanks