I cannot find documentation needed to clean up before upgrading to 1.6. 
Searching 'first_available_file' on http://docs.ansible.com, shows 4 results, 
but the pages themselves do not contain the search term.


PROBLEM: In the playbook below, Ansible 1.4.5 shows 'DEPRECATION WARNING' when 
I use $item, and 'undefined variables' when in use {{item}}.

  - name: build and write /etc/hosts file
    action: template src=templates/$item dest=/etc/hosts owner=root group=root 
mode=0644
    first_available_file:
      - templates/etc-hosts.{{ansible_hostname}}.j2
      - templates/etc-hosts.j2


 [DEPRECATION WARNING]: Legacy variable substitution, such as using ${foo} or
$foo instead of {{ foo }} is currently valid but will be phased out and has
been out of favor since version 1.2. This is the last of legacy features on our
deprecation list. You may continue to use this if you have specific needs for
now. This feature will be removed in version 1.6. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.

How do I refactor this?

-- 
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/A01BD536-988F-4286-BB09-36A1510D0692%40iwelcome.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to