I have an Ansible playbook where I need to change the Server Name in one line and an Specific IP address in another line, as in this line there are a bunch of IP address separated by a comma.
I have the below play which works absolutely fine in case I have to change the entire IP address line with the defined set of IP addresses, But I'm looking for specific IP address i.e. 191.168.1.4 to be looked upon and if found then just replace that only and leave the rest of the IP as it is. Below is the Playbook.. In case below section not visible in above.. with_items: - { From: '#ServerActive=myzabbix1.example.com', To: 'ServerActive=myzabbix2.example.com'} - { From: 'Server=192.168.1.1,192.168.1.2,192.168.1.3,192.168.1.4,192.168.1.5', To: 'Server=192.168.1.1,192.168.1.2,192.168.1.3,192.168.1.10,192.168.1.5'} -- 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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1e5b3efb-2885-4b15-89ed-6ce2cd45ccbcn%40googlegroups.com.