Ansible 2.4.0 FINAL has been released!

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
   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:
  - Default host_vars/group_vars behaviour is now a plugin and ‘overridable’
  - They can now deal with vaulted files again by using the DataLoader
object to read files
  - 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

and Porting Guide 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/ now, and packages for distros
will be available as soon as possible.

Thanks and enjoy!
- Toshio Kuratomi

One other important piece of information ffor those that don't read
changelogs :wink: 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 )
which can be useful when bootstrapping such machines.

-Toshio

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.”

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
    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

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