Afternoon,

I have a template where I have a group of 4 IPs.  I want to make a
list of the 3 IPs  - These 3 IPs are for the other database systems,
so need to except the IP of the current database where the template is
being deployed.  The line that does this is below, but over the can¹t
seem to get it working despite looking at it for a couple of years



/etc/ansible/roles/mysql/templates/template/galera.cnf.j2


Š.

wsrep_cluster_address=gcomm://{{databases | join(',') | difference
(ansible_ipv4.bond0)}};
Š..



When I run the playbook, it fails with the following error.

fatal: [192.168.149.241] => {'msg': "AnsibleUndefinedVariable: One or
more undefined variables: 'ansible_ipv4' is undefined", 'failed':
True}
fatal: [192.168.149.241] => {'msg': 'One or more items failed.',
'failed': True, 'changed': False, 'results': [{'msg':
"AnsibleUndefinedVariable: One or more undefined variables:
'ansible_ipv4' is undefined", 'failed':
True}]} FATAL: all hosts have already failed ‹ aborting



What would be the appropriate way  to use difference filter to achieve
my goal here?

Regards,

William

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAE9rU%2B6C37ofhPTL5YZKW%2BcCw3RLYjN6N6CzX-%3DpMs_5NGrA2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to