title: Ansible: compare variables
body: <p>I am trying to compare some variables so here is my case:</p>
  
  <p><code>pg_master_ip</code> is an ip obviously.</p>
  
  <p>ansible doesn't parse <code>pg_master_ip</code>.</p>
  
  <p><code>bond0.stdout</code> is a result of an earlier register task.</p>
  
  <p>If I could use <code>{{ hostvars[inventory_hostname]['ansible_bond0'].ipv4.address }}</code> I'd be happier but I don't know how.</p>
  
  <pre><code>- name: pgsql and pgpool initiate master
    include: master.yml
    when: bond0.stdout == '{{pg_master_ip}}'
  </code></pre>
  
  <p>Thank you for the advice in advance.</p>