title: Ansible: AnsibleUndefinedVariable: 'ansible_eth1'
body: <p>I'm trying to provision an AWS EC2 instance with Ansible but in a certain task it returns:</p>
  
  <blockquote>
    <p>"AnsibleUndefinedVariable: 'ansible_eth1' is undefined"</p>
  </blockquote>
  
  <p>My question is: what hell is 'ansible_eth1' ,I means: where I found this dammit variable? I googled "where I found ansible_eth1 variable" and things like that but no luck·</p>
  
  <p>My collectd.conf.j2 is:</p>
  
  <pre><code># For each instance where collectd is running, we define 
  # hostname proper to that instance. When metrics from
  # multiple instances are aggregated, hostname will tell 
  # us were they came from.
  
  Hostname "dash"
  
  # Fully qualified domain name, false for our little lab
  FQDNLookup false
  
  # Plugins we are going to use with their configurations,
  # if needed
  LoadPlugin cpu
  
  LoadPlugin df
  &lt;Plugin df&gt;
          Device "/dev/sda1"
          MountPoint "/"
          FSType "ext4"
          ReportReserved true
  &lt;/Plugin&gt;
  
  LoadPlugin interface
  &lt;Plugin interface&gt;
          Interface "eth0"
          Interface "eth1"
          IgnoreSelected false
  &lt;/Plugin&gt;
  
  LoadPlugin network
  &lt;Plugin network&gt;
    &lt;Server "{{ ansible_eth1.ipv4.address }}" "25826"&gt;
    &lt;/Server&gt;
  &lt;/Plugin&gt;
  
  LoadPlugin memory
  
  LoadPlugin syslog
  &lt;Plugin syslog&gt;
          LogLevel info
  &lt;/Plugin&gt;
  
  LoadPlugin swap
  
  &lt;Include "/etc/collectd/collectd.conf.d"&gt;
          Filter "*.conf"
  &lt;/Include&gt;
  </code></pre>
  
  <p>I think is that, I hope the point has been made clear.</p>
  
  <p>Thanks in advance</p>