Hi,

I'm upgrading a few Ansible scripts from 1.8 to 2.0 and I'm not sure how to 
solve this deprecation issue:
"[DEPRECATION WARNING]: Using variables for task params is unsafe, 
especially if the variables come from an external source like facts. This 
feature will be 

removed in a future release. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg."


I've read the porting guide and a few posts here and on GitHub, but I can't 
use "items" in my case.


In my group_vars I define the defaults for the apt task:


apt_defaults:
>   cache_valid_time: 3600
>   install_recommends: no
>   update_cache: yes


In my script I refer to them:


  - name: Install server and helper packages
>     apt: pkg={{item}} state=installed
>     args: "{{apt_defaults}}"
>     with_items:
>       - ntp
>       - curl
>       - git
>       - patch
>       - htop


How can I solve this in the new version?

Thanks!
 

-- 
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/b6ba6ef8-8c78-439b-9464-e1e4cb93d3e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to