Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible 2.4.0.0 deprecation warnings #9

Open
leifmadsen opened this issue Oct 10, 2017 · 7 comments
Open

Ansible 2.4.0.0 deprecation warnings #9

leifmadsen opened this issue Oct 10, 2017 · 7 comments

Comments

@leifmadsen
Copy link

Affected Ansible, Python, OS and Role versions/distributions

  • Ansible: 2.4.0.0
  • Python: 2.7.13
  • Distribution: Fedora 26 / CentOS 7
  • Role version: master

How to reproduce (e.g Ansible plybook you used)

Main role.

What are you seeing

[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or
 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation warnings can be
 disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation 
details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

What behaviour did you expect instead

No deprecation warnings :)

Output log

Any additional information you'd like to impart

This would only be an "issue" as of Ansible version 2.8, so there is some time. Perhaps master should be tested against Ansible latest, and then a version tagged here for < 2.4. Or you can ignore this for a while :)

@smbambling
Copy link
Owner

Thanks for reporting this, like you said there is a little bit of time before 2.8 arrives :). I'll take a look into replacing the use of include though.

@leifmadsen
Copy link
Author

Yea, the main issue is I'm not sure changing it is backwards compatible, so you'd have to really pin to version > 2.3 which might be a bit annoying, especially as 2.4.0.0 was mostly just released :)

@smbambling
Copy link
Owner

smbambling commented Apr 17, 2018

I've created a branch that solves these warning messages and uses the new include_task feature. But this does require Ansible 2.4 or greater. Thus I'll maintain this as a separate branch for a while https://github.com/smbambling/ansible-role-scl/tree/2.4_plus

I'd like to note that the master branch does support 2.4 and 2.5 but does displaying deprecation warnings

@leifmadsen
Copy link
Author

This might be mostly safe to release down into a master branch. I'm no longer using this role, but since Ansible 2.5 is out now (and I've had really good luck with 2.4, and it being shipped in a lot of places as either the default in packaging, or even 2.5 default), it might not be a big deal to tag current to an older release, and merge this against master.

Just a thought :)

@smbambling
Copy link
Owner

Thanks for the input / insight, I'll mull over making this change the default and having a legacy branch that supports older/all of the versions with warning.

Did another role take the place of this or did you move off to another project ?

@leifmadsen
Copy link
Author

I forget what I was originally using this for, but I'm no longer using SCL, so this role is no longer being utilized. It wasn't replaced with anything else though. I think I found a way to not require SCL any longer.

@smbambling
Copy link
Owner

Cool, thanks for all the info and creating the ticket though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants