# Ansible 2.4.0 FINAL has been released!

**URL:** <https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 19, 2017, 5:19am UTC](https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518 "2017-09-19T05:19:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkuratom](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Post date:** [September 19, 2017, 5:19am UTC](https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518/1 "2017-09-19T05:19:49Z")

</div>

Hi all,

On behalf of the entire Ansible open source community, we are very  
happy to announce that Ansible 2.4.0 has been released!

This release includes many new features and improvements, including  
the following:

\* New import/include keywords to replace the old bare `include` directive:  
- Using `import_*` (`import_playbook`, `import_tasks`, `import_role`)  
directives are static.  
- Using `include_*` (`include_tasks`, `include_role`) directives are dynamic.  
- For more information, see  
&nbsp;&nbsp;&nbsp;[http://docs.ansible.com/ansible/latest/playbooks\_reuse\_includes.html](http://docs.ansible.com/ansible/latest/playbooks_reuse_includes.html)

\* New `order` play level keyword that allows the user to change the  
order in which Ansible processes hosts when dispatching tasks.

\* New `ansible_group_priority` variable:  
- Users can now set group merge priority for groups of the same depth  
(parent child relationship), when values are the same or don't exist  
it will fallback to the previous sorting by name'.

\* Updated inventory subsystem:  
- There are now inventory plugins which can take the place of dynamic  
inventory scripts. These plugins have access to more information from  
Ansible itself, leading to cleaner code.  
- It is now possible to specify multiple inventory sources in the  
command line (-i /etc/hosts1 -i /opt/hosts2)  
- Inventory plugins can use Ansible cache plugins (i.e. virtualbox)  
which responds to `meta: refresh_inventory` unlike inventory scripts  
that have their own cache separate from Ansible.  
- Group variable precedence is now configurable via a new  
'precedence' option in ansible.cfg  
- ansible-inventory CLI for querying Ansible inventory directly  
- Improved warnings and error messages across the board

\* Vars plugins updated:  
&nbsp;&nbsp;- Default host\_vars/group\_vars behaviour is now a plugin and ‘overridable’  
&nbsp;&nbsp;- They can now deal with vaulted files again by using the DataLoader  
object to read files  
&nbsp;&nbsp;- Still backwards compatible with existing plugins

\* Configuration has been changed from a hardcoded listing in the  
constants module to dynamically loaded. This lets plugins add new  
config options entirely from within the plugin code.

\* Added an ansible-config CLI listing config options and dumping  
current config

\* Windows modules now support the use of multiple shared module\_utils  
files in the form of Powershell modules (.psm1), via `#Requires  
-Module Ansible.ModuleUtils.Whatever.psm1`

\* Windows become\_method: runas now works across all authtypes and will  
auto-elevate under UAC if WinRM user has "Act as part of the operating  
system" privilege

\* Python module argument\_spec now supports custom validation logic by  
accepting a callable as the `type` argument.

\* Platform agnostic network modules to execute “show” commands and  
push configuration to devices in vendor agnostic way.

For more information, please see the Changelog  
[https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md](https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md)

and Porting Guide [https://docs.ansible.com/ansible/latest/porting\_guide\_2.4.html](https://docs.ansible.com/ansible/latest/porting_guide_2.4.html)

As always, this update is available via PyPi and  
[https://releases.ansible.com/ansible/](https://releases.ansible.com/ansible/) now, and packages for distros  
will be available as soon as possible.

Thanks and enjoy!  
- Toshio Kuratomi

---

<div class="post-metadata">

**Author:** ![tkuratom](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Post date:** [September 19, 2017, 1:42pm UTC](https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518/2 "2017-09-19T13:42:13Z")

</div>

One other important piece of information ffor those that don't read  
changelogs 😉 is that Ansible-2.4 drops support for Python-2.4 and  
Python-2.5 on the managed machines. This means that users who want to  
manage machines that have Python-2.4 or Python-2.5 on them will need  
to install Python-2.6 and above there or stay on an older version of  
Ansible until they can update the machines. Ansible provides the raw  
module ( [https://docs.ansible.com/ansible/latest/raw\_module.html](https://docs.ansible.com/ansible/latest/raw_module.html) )  
which can be useful when bootstrapping such machines.

-Toshio

---

<div class="post-metadata">

**Author:** ![Patrik\_Ragnarsson](https://avatars.discourse-cdn.com/v4/letter/p/c5a1d2/32.png) [@Patrik\_Ragnarsson](https://forum.ansible.com/u/Patrik_Ragnarsson)\
**Post date:** [October 10, 2017, 4:20pm UTC](https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518/3 "2017-10-10T16:20:32Z")

</div>

Isn’t it pretty aggressive to deprecate the use of ‘include’ in the same version that introduces the replacements? Also, the docs says the following about ‘import\_tasks’ and ‘include\_tasks’ making it an even more of aggressive move:

“This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.”

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [October 10, 2017, 4:51pm UTC](https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518/4 "2017-10-10T16:51:35Z")

</div>

> > Hi all,
> > 
> > On behalf of the entire Ansible open source community, we are very  
> > happy to announce that Ansible 2.4.0 has been released!
> > 
> > This release includes many new features and improvements, including  
> > the following:
> > 
> > \* New import/include keywords to replace the old bare `include` directive:  
> > &nbsp;&nbsp;- Using `import_*` (`import_playbook`, `import_tasks`, `import_role`)  
> > directives are static.  
> > &nbsp;&nbsp;- Using `include_*` (`include_tasks`, `include_role`) directives are  
> > dynamic.  
> > &nbsp;&nbsp;- For more information, see  
> > &nbsp;&nbsp;&nbsp;&nbsp;[http://docs.ansible.com/ansible/latest/playbooks\_reuse\_includes.html](http://docs.ansible.com/ansible/latest/playbooks_reuse_includes.html)
> 
> Isn't it pretty aggressive to deprecate the use of 'include' in the same  
> version that introduces the replacements?

Deprecate doesn't mean removed, it's a message to inform the user that it will be removed in the future (two major version after marked as deprecated).

> Also, the docs says the following  
> about 'import\_tasks' and 'include\_tasks' making it an even more of  
> aggressive move:
> 
> "This module is flagged as preview which means that it is not guaranteed to  
> have a backwards compatible interface."

include in 2.3 was also flagged as preview  
[https://docs.ansible.com/ansible/2.3/include\_module.html](https://docs.ansible.com/ansible/2.3/include_module.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 10, 2017, 6:01pm UTC](https://forum.ansible.com/t/ansible-2-4-0-final-has-been-released/25518/5 "2017-10-10T18:01:01Z")

</div>

> Deprecate doesn't mean removed, it's a message to inform the user that it  
> will be removed in the future (two major version after marked as  
> deprecated).

four versions, we changed the deprecation period before 2.3
