{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/ansible-elasticsearch/issues/481","repository_url":"https://api.github.com/repos/elastic/ansible-elasticsearch","labels_url":"https://api.github.com/repos/elastic/ansible-elasticsearch/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/elastic/ansible-elasticsearch/issues/481/comments","events_url":"https://api.github.com/repos/elastic/ansible-elasticsearch/issues/481/events","html_url":"https://github.com/elastic/ansible-elasticsearch/pull/481","id":347651894,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjEyMTI0","number":481,"title":"Change include to import_tasks and include_tasks when suitable to get rid of deprecation warnings","user":{"login":"Dumbaz","id":6582804,"node_id":"MDQ6VXNlcjY1ODI4MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6582804?v=4","gravatar_id":"","url":"https://api.github.com/users/Dumbaz","html_url":"https://github.com/Dumbaz","followers_url":"https://api.github.com/users/Dumbaz/followers","following_url":"https://api.github.com/users/Dumbaz/following{/other_user}","gists_url":"https://api.github.com/users/Dumbaz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dumbaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dumbaz/subscriptions","organizations_url":"https://api.github.com/users/Dumbaz/orgs","repos_url":"https://api.github.com/users/Dumbaz/repos","events_url":"https://api.github.com/users/Dumbaz/events{/privacy}","received_events_url":"https://api.github.com/users/Dumbaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-04T22:13:42Z","updated_at":"2018-08-06T06:31:16Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/elastic/ansible-elasticsearch/pulls/481","html_url":"https://github.com/elastic/ansible-elasticsearch/pull/481","diff_url":"https://github.com/elastic/ansible-elasticsearch/pull/481.diff","patch_url":"https://github.com/elastic/ansible-elasticsearch/pull/481.patch"},"body":"Ansible deprecated the include statement to import tasks and will remove it entirely in the future.\r\n\r\nThis leads to the following deprecation warning:\r\n```\r\n[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\r\nremoved in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.\r\n```\r\n\r\nBoth keywords still work with tagging, so there should be no downside to using the newer terms everywhere.\r\n\r\nI changed the import/include statements in every task, including the tests."},"comment":{"url":"https://api.github.com/repos/elastic/ansible-elasticsearch/issues/comments/410602672","html_url":"https://github.com/elastic/ansible-elasticsearch/pull/481#issuecomment-410602672","issue_url":"https://api.github.com/repos/elastic/ansible-elasticsearch/issues/481","id":410602672,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDYwMjY3Mg==","user":{"login":"Crazybus","id":4550136,"node_id":"MDQ6VXNlcjQ1NTAxMzY=","avatar_url":"https://avatars0.githubusercontent.com/u/4550136?v=4","gravatar_id":"","url":"https://api.github.com/users/Crazybus","html_url":"https://github.com/Crazybus","followers_url":"https://api.github.com/users/Crazybus/followers","following_url":"https://api.github.com/users/Crazybus/following{/other_user}","gists_url":"https://api.github.com/users/Crazybus/gists{/gist_id}","starred_url":"https://api.github.com/users/Crazybus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crazybus/subscriptions","organizations_url":"https://api.github.com/users/Crazybus/orgs","repos_url":"https://api.github.com/users/Crazybus/repos","events_url":"https://api.github.com/users/Crazybus/events{/privacy}","received_events_url":"https://api.github.com/users/Crazybus/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T06:31:16Z","updated_at":"2018-08-06T06:31:16Z","author_association":"MEMBER","body":"@Dumbaz Thanks for picking this up! Have ansible stated anywhere when `include` will be fully removed? I'm a bit confused because it is clearly marked as deprecated however their replacements are both marked as \"preview\".\r\n\r\n> This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.\r\n\r\nLooking at [the changes from 2.4 to 2.5](https://docs.ansible.com/ansible/2.6/porting_guides/porting_guide_2.5.html#dynamic-includes-and-attribute-inheritance) they have already made breaking changes to how these modules work :(. Considering the \"default\" ansible version for this playbook (at least testing is 2.4) I'm not sure how I feel about introducing these changes until the features are moved from preview to something stable and backwards compatible. \r\n\r\nI'm not sure if the backwards compatibility changes this brings in are worth it to remove the deprecation warnings. I would hope that Ansible would only fully remove `include` once these modules are stable. \r\n\r\nI'd love to hear your thoughts on this though. "}}
{"actor":{"display_login":"Crazybus"}}