jdauphant / ansible-role-nginx

Ansible role to install and manage nginx configuration
655 stars 302 forks source link

include statement deprecated in 2.4 #186

Closed rhpvorderman closed 6 years ago

rhpvorderman commented 7 years ago

In ansible 2.4 include is deprecated so I get a deprecation warning when using the nginx role. In the future this should be replaced with either import_tasks or include_tasks. This will break backwards compatibility with older versions of ansible. So I was wondering how the transition is planned so I can prepare my playbooks accordingly. Keep up the good work!

jdauphant commented 7 years ago

Nothing planned yet. If you have a proposition don't hesitate. Do you know in which version "include" will be removed ?

rhpvorderman commented 7 years ago

Directly from the Ansible changelog

  • New import/include keywords to replace the old bare include directives. The use of static: {yes|no} on such includes is now deprecated.
  • Using import_* (import_playbook, import_tasks, import_role) directives are static.
  • Using include_* (include_tasks, include_role) directives are dynamic. This is done to avoid collisions and possible security issues as facts come from the remote targets and they might be compromised.

More information can be found here

But it seems there is no information on when include will be deprecated.

My proposal would be to update the next version to 2.4. With ansible moving so fast It's a good thing to stay on top of changes. I will do a pull request later today.

boldandbusted commented 6 years ago

Hmm... is this actually still an issue, with the two merges above? Cheers.

rhpvorderman commented 6 years ago

indeed not an issue anymore.