Ansible 4 Porting Guide
We suggest you read this page along with the Ansible 4 Changelog to understand what updates you may need to make.
Playbook
The
jinja2_native
setting now does not affect the template module which implicitly returns strings. For the template lookup there is a new argumentjinja2_native
(off by default) to control that functionality. The rest of the Jinja2 expressions still operate based on thejinja2_native
setting.
Command Line
The
ansible-galaxy login
command has been removed, as the underlying API it used for GitHub auth has been shut down. Publishing roles or collections to Galaxy withansible-galaxy
now requires that a Galaxy API token be passed to the CLI using a token file (default location~/.ansible/galaxy_token
) or (insecurely) with the--token
argument toansible-galaxy
.
Deprecated
The constant ansible.module_utils.basic._CHECK_ARGUMENT_TYPES_DISPATCHER
is deprecated. Use ansible.module_utils.common.parameters.DEFAULT_TYPE_VALIDATORS
instead.
Breaking Changes
Changes to AnsibleModule
With the move to ArgumentSpecValidator
for performing argument spec validation, the following private methods in AnsibleModule
have been removed:
_check_argument_types()
_check_argument_values()
_check_arguments()
_check_mutually_exclusive()
–>ansible.module_utils.common.validation.check_mutually_exclusive()
_check_required_arguments()
–>ansible.module_utils.common.validation.check_required_arguments()
_check_required_by()
–>ansible.module_utils.common.validation.check_required_by()
_check_required_if()
–>ansible.module_utils.common.validation.check_required_if()
_check_required_one_of()
–>ansible.module_utils.common.validation.check_required_one_of()
_check_required_together()
–>ansible.module_utils.common.validation.check_required_together()
_check_type_bits()
–>ansible.module_utils.common.validation.check_type_bits()
_check_type_bool()
–>ansible.module_utils.common.validation.check_type_bool()
_check_type_bytes()
–>ansible.module_utils.common.validation.check_type_bytes()
_check_type_dict()
–>ansible.module_utils.common.validation.check_type_dict()
_check_type_float()
–>ansible.module_utils.common.validation.check_type_float()
_check_type_int()
–>ansible.module_utils.common.validation.check_type_int()
_check_type_jsonarg()
–>ansible.module_utils.common.validation.check_type_jsonarg()
_check_type_list()
–>ansible.module_utils.common.validation.check_type_list()
_check_type_path()
–>ansible.module_utils.common.validation.check_type_path()
_check_type_raw()
–>ansible.module_utils.common.validation.check_type_raw()
_check_type_str()
–>ansible.module_utils.common.validation.check_type_str()
_count_terms()
–>ansible.module_utils.common.validation.count_terms()
_get_wanted_type()
_handle_aliases()
_handle_no_log_values()
_handle_options()
_set_defaults()
_set_fallbacks()
Modules or plugins using these private methods should use the public functions in ansible.module_utils.common.validation
or ArgumentSpecValidator.validate()
if no public function was listed above.
Changes to ansible.module_utils.common.parameters
The following functions in ansible.module_utils.common.parameters
are now private and should not be used directly. Use ArgumentSpecValidator.validate()
instead.
list_no_log_values
list_deprecations
handle_aliases
Other
Upgrading: If upgrading from
ansible < 2.10
or fromansible-base
and using pip, you mustpip uninstall ansible
orpip uninstall ansible-base
before installingansible-core
to avoid conflicts.Python 3.8 on the controller node is a soft requirement for this release.
ansible-core
2.11 still works with the same versions of Python thatansible-base
2.10 worked with, however 2.11 emits a warning when running on a controller node with a Python version less than 3.8. This warning can be disabled by settingANSIBLE_CONTROLLER_PYTHON_WARNING=False
in your environment.ansible-core
2.12 will require Python 3.8 or greater.The configuration system now validates the
choices
field, so any settings that violate it and were ignored in 2.10 cause an error in 2.11. For example,ANSIBLE_COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH=0
now causes an error (valid choices areignore
,warn
orerror
).The
ansible-galaxy
command now usesresolvelib
for resolving dependencies. In most cases this should not make a user-facing difference beyond being more performant, but we note it here for posterity and completeness.If you import Python
module_utils
into any modules you maintain, you may now mark the import as optional during the module payload build by wrapping theimport
statement in atry
orif
block. This allows modules to usemodule_utils
that may not be present in all versions of Ansible or a collection, and to perform arbitrary recovery or fallback actions during module runtime.
Modules
The
apt_key
module has explicitly definedfile
as mutually exclusive withdata
,keyserver
andurl
. They cannot be used together anymore.The
meta
module now supports tags for user-defined tasks. Set the task’s tags to ‘always’ to maintain the previous behavior. Internalmeta
tasks continue to always run.
Modules removed
The following modules no longer exist:
No notable changes
Deprecation notices
No notable changes
Noteworthy module changes
facts - On NetBSD,
ansible_virtualization_type
now tries to report a more accurate result thanxen
when virtualized and not running on Xen.facts - Virtualization facts now include
virtualization_tech_guest
andvirtualization_tech_host
keys. These are lists of virtualization technologies that a guest is a part of, or that a host provides, respectively. As an example, if you set up a host to provide both KVM and VirtualBox, both values are included invirtualization_tech_host
. Similarly, a podman container running on a VM powered by KVM has avirtualization_tech_guest
of["kvm", "podman", "container"]
.The parameter
filter
type is changed fromstring
tolist
in the setup module in order to use more than one filter. Previous behavior (using astring
) still remains and works as a single filter.
Plugins
inventory plugins -
CachePluginAdjudicator.flush()
now calls the underlying cache plugin’sflush()
instead of only deleting keys that it knows about. Inventory plugins should usedelete()
to remove any specific keys. As a user, this means that when an inventory plugin calls itsclear_cache()
method, facts could also be flushed from the cache. To work around this, users can configure inventory plugins to use a cache backend that is independent of the facts cache.callback plugins -
meta
task execution is now sent tov2_playbook_on_task_start
like any other task. By default, only explicit meta tasks are sent there. Callback plugins can opt-in to receiving internal, implicitly created tasks to act on those as well, as noted in the plugin development documentation.The
choices
are now validated, so plugins that were using incorrect or incomplete choices issue an error in 2.11 if the value provided does not match. This has a simple fix: update the entries inchoices
to match reality.
Porting custom scripts
No notable changes
Porting Guide for v4.10.0
Major Changes
containers.podman
Add podman_tag module
Add secrets driver and driver opts support
Deprecated Features
cisco.nxos
Deprecated nxos_snmp_community module.
Deprecated nxos_snmp_contact module.
Deprecated nxos_snmp_host module.
Deprecated nxos_snmp_location module.
Deprecated nxos_snmp_traps module.
Deprecated nxos_snmp_user module.
junipernetworks.junos
‘router_id’ options is deprecated from junos_ospf_interfaces, junos_ospfv2 and junos_ospfv3 resource module.
Porting Guide for v4.9.0
Known Issues
purestorage.flashblade
purefb_lag - The mac_address field in the response is not populated. This will be fixed in a future FlashBlade update.
Major Changes
fortinet.fortios
Add real-world use cases in the example section for some configuration modules.
Collect the current configurations of the modules and convert them into playbooks.
Support FortiOS 7.0.1.
Support member operation (delete/add extra members) on an object that has a list of members in it.
Support selectors feature in
fortios_monitor_fact
andfortios_log_fact
.
Porting Guide for v4.8.0
Breaking Changes
community.zabbix
all roles now reference other roles and modules through their fully qualified collection names, which makes Ansible 2.10 minimum supported version for roles (see issue 477).
Deprecated Features
community.azure
All community.azure.azure_rm_<resource>_facts modules are deprecated. Use azure.azcollection.azure_rm_<resource>_info modules instead (https://github.com/ansible-collections/community.azure/pull/24).
All community.azure.azure_rm_<resource>_info modules are deprecated. Use azure.azcollection.azure_rm_<resource>_info modules instead (https://github.com/ansible-collections/community.azure/pull/24).
community.azure.azure_rm_managed_disk and community.azure.azure_rm_manageddisk are deprecated. Use azure.azcollection.azure_rm_manageddisk instead (https://github.com/ansible-collections/community.azure/pull/24).
community.azure.azure_rm_virtualmachine_extension and community.azure.azure_rm_virtualmachineextension are deprecated. Use azure.azcollection.azure_rm_virtualmachineextension instead (https://github.com/ansible-collections/community.azure/pull/24).
community.azure.azure_rm_virtualmachine_scaleset and community.azure.azure_rm_virtualmachinescaleset are deprecated. Use azure.azcollection.azure_rm_virtualmachinescaleset instead (https://github.com/ansible-collections/community.azure/pull/24).
community.hashi_vault
lookup hashi_vault - the
[lookup_hashi_vault]
section in theansible.cfg
file is deprecated and will be removed in collection version3.0.0
. Instead, the section[hashi_vault_collection]
can be used, which will apply to all plugins in the collection going forward (https://github.com/ansible-collections/community.hashi_vault/pull/144).
Porting Guide for v4.7.0
Major Changes
openvswitch.openvswitch
By mistake we tagged the repo to 2.0.0 and as it wasn’t intended and cannot be reverted we’re releasing 2.0.1 to make the community aware of the major version update.
Deprecated Features
cisco.ios
Deprecated ios_ntp modules.
cisco.nxos
Deprecated nxos_ntp, nxos_ntp_options, nxos_ntp_auth modules.
community.vmware
vmware_guest_vnc - Sphere 7.0 removed the built-in VNC server (https://docs.vmware.com/en/VMware-vSphere/7.0/rn/vsphere-esxi-vcenter-server-70-release-notes.html#productsupport).
junipernetworks.junos
Deprecated router_id from ospfv2 resource module.
Porting Guide for v4.6.0
Major Changes
containers.podman
Add systemd generation for pods
Generate systemd service files for containers
gluster.gluster
enable client.ssl,server.ssl before starting the gluster volume (https://github.com/gluster/gluster-ansible-collection/pull/19)
Deprecated Features
community.grafana
grafana_dashboard lookup - Providing a mangled version of the API key is no longer preferred.
Porting Guide for v4.5.0
Major Changes
hetzner.hcloud
Introduction of placement groups
ovirt.ovirt
remove_stale_lun - Add role for removing stale LUN (https://bugzilla.redhat.com/1966873).
Deprecated Features
ansible.netcommon
network_cli - The paramiko_ssh setting
look_for_keys
was set automatically based on the values of thepassword
andprivate_key_file
options passed to network_cli. This option can now be set explicitly, and the automatic setting oflook_for_keys
will be removed after 2024-01-01 (https://github.com/ansible-collections/ansible.netcommon/pull/271).
cisco.ios
Deprecated ios_bgp in favor of ios_bgp_global and ios_bgp_address_family.
Remove testing with provider for ansible-test integration jobs. This helps prepare us to move to network-ee integration tests.
junipernetworks.junos
Deprecated router_id from ospfv3 resource module.
Porting Guide for v4.4.0
Known Issues
dellemc.openmanage
idrac_user - Issue(192043) Module may error out with the message
unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress
. Wait for the job to complete and run the task again.
Deprecated Features
cisco.iosxr
The iosxr_logging module has been deprecated in favor of the new iosxr_logging_global resource module and will be removed in a release after ‘2023-08-01’.
cisco.nxos
The nxos_logging module has been deprecated in favor of the new nxos_logging_global resource module and will be removed in a release after ‘2023-08-01’.
community.docker
docker_container - the new
command_handling
’s default value,compatibility
, is deprecated and will change tocorrect
in community.docker 3.0.0. A deprecation warning is emitted by the module in cases where the behavior will change. Please note that ansible-core will output a deprecation warning only once, so if it is shown for an earlier task, there could be more tasks with this warning where it is not shown (https://github.com/ansible-collections/community.docker/pull/186).
junipernetworks.junos
The junos_logging module has been deprecated in favor of the new junos_logging_global resource module and will be removed in a release after ‘2023-08-01’.
vyos.vyos
The vyos_logging module has been deprecated in favor of the new vyos_logging_global resource module and will be removed in a release after “2023-08-01”.
Porting Guide for v4.3.0
Major Changes
netapp.cloudmanager
Adding stage environment to all modules in cloudmanager
Deprecated Features
community.hashi_vault
hashi_vault collection - support for Python 3.5 will be dropped in version
2.0.0
ofcommunity.hashi_vault
(https://github.com/ansible-collections/community.hashi_vault/issues/81).
Porting Guide for v4.2.0
Known Issues
dellemc.openmanage
idrac_user - Issue(192043) Module may error out with the message
unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress
. Wait for the job to complete and run the task again.ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does not allow the creation of multiple uplinks of the same name even though this is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified.
Major Changes
community.vmware
vmware_object_custom_attributes_info - added a new module to gather custom attributes of an object (https://github.com/ansible-collections/community.vmware/pull/851).
dellemc.openmanage
idrac_server_config_profile - Added support for exporting and importing Server Configuration Profile through HTTP/HTTPS share.
ome_device_group - Added support for adding devices to a group using the IP addresses of the devices and group ID.
fortinet.fortios
New module fortios_monitor_fact.
Support Fortios 7.0.
Support Log APIs.
Deprecated Features
The community.kubernetes collection is being renamed to kubernetes.core. In Ansible 5, community.kubernetes will be replaced by an empty collection which has deprecated redirects for all the current content to kubernetes.core. If you are using FQCNs starting with
community.kubernetes.
, please update them tokubernetes.core.
now. Note that kubernetes.core has been included in Ansible since Ansible 3.0.0 (https://github.com/ansible-community/community-topics/issues/22).
ansible.windows
win_updates - Deprecated the
filtered_reason
return value for each filtered up in favour offiltered_reasons
. This has been done to show all the reasons why an update was filtered and not just the first reason.win_updates - Deprecated the
use_scheduled_task
option as it is no longer used.win_updates - Deprecated the
whitelist
andblacklist
options in favour ofaccept_list
andreject_list
respectively to conform to the new standards used in Ansible for these types of options.
community.general
ali_instance_info - marked removal version of deprecated parameters
availability_zone
andinstance_names
(https://github.com/ansible-collections/community.general/issues/2429).serverless - deprecating parameter
functions
because it was not used in the code (https://github.com/ansible-collections/community.general/pull/2845).
community.hashi_vault
hashi_vault collection - support for Python 2 will be dropped in version
2.0.0
ofcommunity.hashi_vault
(https://github.com/ansible-collections/community.hashi_vault/issues/81).
Porting Guide for v4.1.0
Known Issues
dellemc.openmanage
idrac_user - Issue(192043) Module may error out with the message
unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress
. Wait for the job to complete and run the task again.ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does not allow the creation of multiple uplinks of the same name even though this is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified.
Major Changes
cloudscale_ch.cloud
Add custom_image module
community.postgresql
postgresql_query - the default value of the
as_single_query
option will be changed toyes
in community.postgresql 2.0.0 (https://github.com/ansible-collections/community.postgresql/issues/85).
dellemc.openmanage
ome_firmware_baseline - Module supports check mode, and allows the modification and deletion of firmware baselines.
ome_firmware_catalog - Module supports check mode, and allows the modification and deletion of firmware catalogs.
fortinet.fortios
Improve
fortios_configuration_fact
to use multiple selectors concurrently.Support
check_mode
in all cofigurationAPI-based modules.Support filtering for fact gathering modules
fortios_configuration_fact
andfortios_monitor_fact
.Support moving policy in
firewall_central_snat_map
.Unify schemas for monitor API.
netbox.netbox
packages is now a required Python package and gets installed through Ansible 2.10+.
Removed Features
ansible.windows
win_reboot - Removed
shutdown_timeout
andshutdown_timeout_sec
which has not done anything since Ansible 2.5.
Deprecated Features
ansible.windows
win_reboot - Unreachable hosts can be ignored with
ignore_errors: True
, this ability will be removed in a future version. Useignore_unreachable: True
to ignore unreachable hosts instead. - https://github.com/ansible-collections/ansible.windows/issues/62
community.docker
docker_* modules and plugins, except
docker_swarm
connection plugin anddocker_compose
anddocker_stack*` modules - the current default ``localhost
fortls_hostname
is deprecated. In community.docker 2.0.0 it will be computed fromdocker_host
instead (https://github.com/ansible-collections/community.docker/pull/134).
community.general
All inventory and vault scripts will be removed from community.general in version 4.0.0. If you are referencing them, please update your references to the new contrib-scripts GitHub repository so your workflow will not break once community.general 4.0.0 is released (https://github.com/ansible-collections/community.general/pull/2697).
The nios, nios_next_ip, nios_next_network lookup plugins, the nios documentation fragment, and the nios_host_record, nios_ptr_record, nios_mx_record, nios_fixed_address, nios_zone, nios_member, nios_a_record, nios_aaaa_record, nios_network, nios_dns_view, nios_txt_record, nios_naptr_record, nios_srv_record, nios_cname_record, nios_nsgroup, and nios_network_view module have been deprecated and will be removed from community.general 5.0.0. Please install the infoblox.nios_modules collection instead and use its plugins and modules (https://github.com/ansible-collections/community.general/pull/2458).
The vendored copy of
ipaddress
will be removed in community.general 4.0.0. Please switch toipaddress
from the Python 3 standard library, or from pypi, if your code relies on the vendored version ofipaddress
(https://github.com/ansible-collections/community.general/pull/2459).linode - parameter
backupsenabled
is deprecated and will be removed in community.general 5.0.0 (https://github.com/ansible-collections/community.general/pull/2410).lxd inventory plugin - the plugin will require
ipaddress
installed when used with Python 2 from community.general 4.0.0 on.ipaddress
is part of the Python 3 standard library, but can be installed for Python 2 from pypi (https://github.com/ansible-collections/community.general/pull/2459).scaleway_security_group_rule - the module will require
ipaddress
installed when used with Python 2 from community.general 4.0.0 on.ipaddress
is part of the Python 3 standard library, but can be installed for Python 2 from pypi (https://github.com/ansible-collections/community.general/pull/2459).
inspur.sm
add_ad_group - This feature will be removed in inspur.sm.add_ad_group 3.0.0. replaced with inspur.sm.ad_group.
add_ldap_group - This feature will be removed in inspur.sm.add_ldap_group 3.0.0. replaced with inspur.sm.ldap_group.
add_user - This feature will be removed in inspur.sm.add_user 3.0.0. replaced with inspur.sm.user.
add_user_group - This feature will be removed in inspur.sm.add_user_group 3.0.0. replaced with inspur.sm.user_group.
del_ad_group - This feature will be removed in inspur.sm.del_ad_group 3.0.0. replaced with inspur.sm.ad_group.
del_ldap_group - This feature will be removed in inspur.sm.del_ldap_group 3.0.0. replaced with inspur.sm.ldap_group.
del_user - This feature will be removed in inspur.sm.del_user 3.0.0. replaced with inspur.sm.user.
del_user_group - This feature will be removed in inspur.sm.del_user_group 3.0.0. replaced with inspur.sm.user_group.
edit_ad_group - This feature will be removed in inspur.sm.edit_ad_group 3.0.0. replaced with inspur.sm.ad_group.
edit_ldap_group - This feature will be removed in inspur.sm.edit_ldap_group 3.0.0. replaced with inspur.sm.ldap_group.
edit_user - This feature will be removed in inspur.sm.edit_user 3.0.0. replaced with inspur.sm.user.
edit_user_group - This feature will be removed in inspur.sm.edit_user_group 3.0.0. replaced with inspur.sm.user_group.
Porting Guide for v4.0.0
Known Issues
Ansible-core
ansible-test - The
pylint
sanity test no longer correctly detects “bad” variable names for non-constants. See issue 3701 for additional details.
dellemc.openmanage
idrac_user - Issue(192043) Module may error out with the message
unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress
. Wait for the job to complete and run the task again.ome_configuration_compliance_info - Issue(195592) Module may error out with the message
unable to process the request because an error occurred
. If the issue persists, report it to the system administrator.ome_smart_fabric - Issue(185322) Only three design types are supported by OpenManage Enterprise Modular but the module successfully creates a fabric when the design type is not supported.
ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does not allow the creation of multiple uplinks of the same name even though this is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified.
fortinet.fortios
Modules for monitor API are not versioned yet.
Breaking Changes
Ansible-core
Made SCM collections be reinstalled regardless of
--force
being present.NetBSD virtualization facts (specifically
ansible_virtualization_type
) now returns a more accurate value by checking the value of themachdep.hypervisor
sysctl
key. This change is breaking because in some cases previously, we would erroneously reportxen
even when the target is not running on Xen. This prevents that behavior in most cases. (https://github.com/ansible/ansible/issues/69352)Replaced the in-tree dependency resolver with an external implementation that pip >= 20.3 uses now by default —
resolvelib
. (https://github.com/ansible/ansible/issues/71784)The
meta
module now supports tags for user-defined tasks. Internalmeta
tasks continue to always run. (https://github.com/ansible/ansible/issues/64558)ansible-galaxy login command has been removed (see issue 71560)
ansible.netcommon
Removed vendored ipaddress package from collection. If you use ansible_collections.ansible.netcommon.plugins.module_utils.compat.ipaddress in your collection, you will need to change this to import ipaddress instead. If your content using ipaddress supports Python 2.7, you will additionally need to make sure that the user has the ipaddress package installed. Please refer to https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html#importing-and-using-shared-code to see how to safely import external packages that may be missing from the user’s system A backport of ipaddress for Python 2.7 is available at https://pypi.org/project/ipaddress/
community.docker
docker_swarm - if
join_token
is specified, a returned join token with the same value will be replaced byVALUE_SPECIFIED_IN_NO_LOG_PARAMETER
. Make sure that you do not blindly use the join tokens from the return value of this module when the module is invoked withjoin_token
specified! This breaking change appears in a minor release since it is necessary to fix a security issue (https://github.com/ansible-collections/community.docker/pull/103).
community.general
If you use Ansible 2.9 and these plugins or modules from this collection, community.general 3.0.0 results in errors when trying to use the DellEMC content by FQCN, like
community.general.idrac_firmware
. Since Ansible 2.9 is not able to use redirections, you will have to adjust your playbooks and roles manually to use the new FQCNs (dellemc.openmanage.idrac_firmware
for the previous example) and to make sure that you havedellemc.openmanage
installed.If you use ansible-base 2.10 or newer and did not install Ansible 4.0.0, but installed (and/or upgraded) community.general manually, you need to make sure to also install the
dellemc.openmanage
collection if you are using any of these plugins or modules. While ansible-base 2.10 or newer can use the redirects that community.general 3.0.0 adds, the collection they point to (such as dellemc.openmanage) must be installed for them to work.gitlab_deploy_key - if for an already existing key title a different public key was given as parameter nothing happened, now this changed so that the public key is updated to the new value (https://github.com/ansible-collections/community.general/pull/1661).
java_keystore - instead of failing, now overwrites keystore if the alias (name) is changed. This was originally the intended behavior, but did not work due to a logic error. Make sure that your playbooks and roles do not depend on the old behavior of failing instead of overwriting (https://github.com/ansible-collections/community.general/issues/1671).
java_keystore - instead of failing, now overwrites keystore if the passphrase is changed. Make sure that your playbooks and roles do not depend on the old behavior of failing instead of overwriting (https://github.com/ansible-collections/community.general/issues/1671).
one_image - use pyone instead of python-oca (https://github.com/ansible-collections/community.general/pull/2032).
utm_proxy_auth_profile - the
frontend_cookie_secret
return value now contains a placeholder string instead of the module’sfrontend_cookie_secret
parameter (https://github.com/ansible-collections/community.general/pull/1736).
fortinet.fortios
Generic FortiOS Module - FOS module to issue generic request with Ansible.
Support for FOS Monitor API - several modules are new for monitor API.
Unified Collection - The fortios collection itself will be adapting any FOS platforms.
servicenow.servicenow
auth field now required for anything other than Basic authentication
theforeman.foreman
All role variables are now prefixed with
foreman_
to avoid clashes with similarly named variables from roles outside this collection.
Major Changes
Ansible-core
A collection can be reinstalled with new version requirements without using the
--force
flag. The collection’s dependencies will also be updated if necessary with the new requirements. Use--upgrade
to force transitive dependency updates.AnsibleModule - use
ArgumentSpecValidator
class for validating argument spec and remove private methods related to argument spec validation. Any modules using private methods should now use theArgumentSpecValidator
class or the appropriate validation function.Declared
resolvelib >= 0.5.3, < 0.6.0
a direct dependency of ansible-core. Refs: - https://github.com/sarugaku/resolvelib - https://pypi.org/p/resolvelib - https://pradyunsg.me/blog/2020/03/27/pip-resolver-testingIt became possible to install Ansible Collections from local folders and namespaces folder similar to SCM structure with multiple collections.
It became possible to upgrade Ansible collections from Galaxy servers using the
--upgrade
option withansible-galaxy collection install
.Support for role argument specification validation at role execution time. When a role contains an argument spec, an implicit validation task is inserted at the start of role execution.
add
ArgumentSpecValidator
class for validating parameters against an argument spec outside ofAnsibleModule
(https://github.com/ansible/ansible/pull/73335)ansible-test - Tests run with the
centos6
anddefault
test containers now use a PyPI proxy container to access PyPI when Python 2.6 is used. This allows tests running under Python 2.6 to continue functioning even though PyPI is discontinuing support for non-SNI capable clients.
ansible.netcommon
Remove deprecated connection arguments from netconf_config
arista.eos
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules - Please refer to ansible.netcommon changelog for more details.
cisco.asa
Please refer to ansible.netcommon changelog <https://github.com/ansible-collections/ansible.netcommon/blob/main/changelogs/CHANGELOG.rst#ansible-netcommon-collection-release-notes> for more details.
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules.
cisco.ios
Please refer to ansible.netcommon changelog for more details.
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules.
cisco.iosxr
Please refer to ansible.netcommon changelog for more details.
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules.
ipaddress is no longer in ansible.netcommon. For Python versions without ipaddress (< 3.0), the ipaddress package is now required.
cisco.nxos
Please refer to ansible.netcommon changelog for more details.
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules.
community.grafana
introduce “skip_version_check” parameter in grafana_teams and grafana_folder modules (#147)
community.mysql
mysql_replication - add deprecation warning that the
Is_Slave
andIs_Master
return values will be replaced withIs_Primary
andIs_Replica
incommunity.mysql
3.0.0 (https://github.com/ansible-collections/community.mysql/pull/147).mysql_replication - the choices of the
state
option containingmaster
will be finally replaced with the alternativeprimary
choices incommunity.mysql
3.0.0, add deprecation warnings (https://github.com/ansible-collections/community.mysql/pull/150).mysql_replication - the mode options values
getslave
,startslave
,stopslave
,resetslave
,resetslaveall` and the master_use_gtid option ``slave_pos
are deprecated (see the alternative values) and will be removed incommunity.mysql
3.0.0 (https://github.com/ansible-collections/community.mysql/pull/97).mysql_replication - the return value
Is_Slave
andIs_Master
will be replaced withIs_Replica
andIs_Primary
incommunity.mysql
3.0.0 (https://github.com/ansible-collections/community.mysql/issues/145).mysql_replication - the word
SLAVE
in messages returned by the module will be changed toREPLICA
incommunity.mysql
2.0.0 (https://github.com/ansible-collections/community.mysql/issues/98).mysql_replication - the word
master
in messages returned by the module will be replaced withprimary
incommunity.mysql
3.0.0 (https://github.com/ansible-collections/community.mysql/issues/145).mysql_replication - the word
slave
in messages returned by the module replaced withreplica
(https://github.com/ansible-collections/community.mysql/issues/98).mysql_user - the
REQUIRESSL
is an alias for thessl
key in thetls_requires
option incommunity.mysql
2.0.0 and support will be dropped altogether incommunity.mysql
3.0.0 (https://github.com/ansible-collections/community.mysql/issues/121).
fortinet.fortios
New module fortios_configuration_fact
New module fortios_json_generic
New module fortios_monitor
New module fortios_monitor_fact
junipernetworks.junos
Please refer to ansible.netcommon changelog for more details.
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules.
netapp.ontap
na_ontap_autosupport - Added REST support to the module.
openvswitch.openvswitch
There is no major changes for this particular release and it was tagged by mistake and cannot be reverted.
servicenow.servicenow
refactored client to inherit from AnsibleModule
supports OpenID Connect authentication protocol
supports bearer tokens for authentication
vyos.vyos
Please refer to ansible.netcommon changelog for more details.
Requires ansible.netcommon v2.0.0+ to support ansible_network_single_user_mode and ansible_network_import_modules
ipaddress is no longer in ansible.netcommon. For Python versions without ipaddress (< 3.0), the ipaddress package is now required.
Removed Features
Ansible-core
Removed SharedPluginLoaderObj class from ansible.plugins.strategy. It was deprecated in favor of using the standard plugin loader.
Removed _get_item() alias from callback plugin base class which had been deprecated in favor of _get_item_label().
The “user” parameter was previously deprecated and is now removed in favor of “scope”
The deprecated
ansible.constants.BECOME_METHODS
has been removed.The deprecated
ansible.constants.get_config()
has been removed.The deprecated
ansible.constants.mk_boolean()
has been removed.with_* loops are no longer optimized for modules whose name parameters can take lists (mostly package managers). Use name instead of looping over individual names with with_items and friends.
community.general
The
ome_device_info
,idrac_firmware
andidrac_server_config_profile
modules have now been migrated from community.general to the dellemc.openmanage Ansible collection. If you use ansible-base 2.10 or newer, redirections have been provided.If you use Ansible 2.9 and installed this collection, you need to adjust the FQCNs (
community.general.idrac_firmware
→dellemc.openmanage.idrac_firmware
) and make sure to install the dellemc.openmanage collection.The deprecated ali_instance_facts module has been removed. Use ali_instance_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated gluster_heal_info module has been removed. Use gluster.gluster.gluster_heal_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated gluster_peer module has been removed. Use gluster.gluster.gluster_peer instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated gluster_volume module has been removed. Use gluster.gluster.gluster_volume instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated helm module has been removed. Use community.kubernetes.helm instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated hpilo_facts module has been removed. Use hpilo_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated idrac_redfish_facts module has been removed. Use idrac_redfish_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated jenkins_job_facts module has been removed. Use jenkins_job_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ldap_attr module has been removed. Use ldap_attrs instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated memset_memstore_facts module has been removed. Use memset_memstore_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated memset_server_facts module has been removed. Use memset_server_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated na_ontap_gather_facts module has been removed. Use netapp.ontap.na_ontap_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated nginx_status_facts module has been removed. Use nginx_status_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated one_image_facts module has been removed. Use one_image_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated onepassword_facts module has been removed. Use onepassword_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_datacenter_facts module has been removed. Use oneview_datacenter_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_enclosure_facts module has been removed. Use oneview_enclosure_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_ethernet_network_facts module has been removed. Use oneview_ethernet_network_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_fc_network_facts module has been removed. Use oneview_fc_network_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_fcoe_network_facts module has been removed. Use oneview_fcoe_network_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_logical_interconnect_group_facts module has been removed. Use oneview_logical_interconnect_group_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_network_set_facts module has been removed. Use oneview_network_set_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated oneview_san_manager_facts module has been removed. Use oneview_san_manager_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated online_server_facts module has been removed. Use online_server_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated online_user_facts module has been removed. Use online_user_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt module has been removed. Use ovirt.ovirt.ovirt_vm instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_affinity_label_facts module has been removed. Use ovirt.ovirt.ovirt_affinity_label_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_api_facts module has been removed. Use ovirt.ovirt.ovirt_api_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_cluster_facts module has been removed. Use ovirt.ovirt.ovirt_cluster_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_datacenter_facts module has been removed. Use ovirt.ovirt.ovirt_datacenter_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_disk_facts module has been removed. Use ovirt.ovirt.ovirt_disk_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_event_facts module has been removed. Use ovirt.ovirt.ovirt_event_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_external_provider_facts module has been removed. Use ovirt.ovirt.ovirt_external_provider_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_group_facts module has been removed. Use ovirt.ovirt.ovirt_group_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_host_facts module has been removed. Use ovirt.ovirt.ovirt_host_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_host_storage_facts module has been removed. Use ovirt.ovirt.ovirt_host_storage_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_network_facts module has been removed. Use ovirt.ovirt.ovirt_network_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_nic_facts module has been removed. Use ovirt.ovirt.ovirt_nic_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_permission_facts module has been removed. Use ovirt.ovirt.ovirt_permission_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_quota_facts module has been removed. Use ovirt.ovirt.ovirt_quota_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_scheduling_policy_facts module has been removed. Use ovirt.ovirt.ovirt_scheduling_policy_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_snapshot_facts module has been removed. Use ovirt.ovirt.ovirt_snapshot_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_storage_domain_facts module has been removed. Use ovirt.ovirt.ovirt_storage_domain_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_storage_template_facts module has been removed. Use ovirt.ovirt.ovirt_storage_template_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_storage_vm_facts module has been removed. Use ovirt.ovirt.ovirt_storage_vm_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_tag_facts module has been removed. Use ovirt.ovirt.ovirt_tag_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_template_facts module has been removed. Use ovirt.ovirt.ovirt_template_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_user_facts module has been removed. Use ovirt.ovirt.ovirt_user_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_vm_facts module has been removed. Use ovirt.ovirt.ovirt_vm_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated ovirt_vmpool_facts module has been removed. Use ovirt.ovirt.ovirt_vmpool_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated purefa_facts module has been removed. Use purestorage.flasharray.purefa_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated purefb_facts module has been removed. Use purestorage.flasharray.purefb_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated python_requirements_facts module has been removed. Use python_requirements_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated redfish_facts module has been removed. Use redfish_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_image_facts module has been removed. Use scaleway_image_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_ip_facts module has been removed. Use scaleway_ip_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_organization_facts module has been removed. Use scaleway_organization_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_security_group_facts module has been removed. Use scaleway_security_group_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_server_facts module has been removed. Use scaleway_server_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_snapshot_facts module has been removed. Use scaleway_snapshot_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated scaleway_volume_facts module has been removed. Use scaleway_volume_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated smartos_image_facts module has been removed. Use smartos_image_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated vertica_facts module has been removed. Use vertica_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The deprecated xenserver_guest_facts module has been removed. Use xenserver_guest_info instead (https://github.com/ansible-collections/community.general/pull/1924).
The ovirt_facts docs fragment has been removed (https://github.com/ansible-collections/community.general/pull/1924).
airbrake_deployment - removed deprecated
token
parameter. Useproject_id
andproject_key
instead (https://github.com/ansible-collections/community.general/pull/1926).bigpanda - the alias
message
has been removed. Usedeployment_message
instead (https://github.com/ansible-collections/community.general/pull/1926).cisco_spark, cisco_webex - the alias
message
has been removed. Usemsg
instead (https://github.com/ansible-collections/community.general/pull/1926).clc_aa_policy - the
wait
parameter has been removed. It did not have any effect (https://github.com/ansible-collections/community.general/pull/1926).datadog_monitor - the alias
message
has been removed. Usenotification_message
instead (https://github.com/ansible-collections/community.general/pull/1926).django_manage - the parameter
liveserver
has been removed (https://github.com/ansible-collections/community.general/pull/1926).idrac_redfish_config - the parameters
manager_attribute_name
andmanager_attribute_value
have been removed. Usemanager_attributes
instead (https://github.com/ansible-collections/community.general/pull/1926).iso_extract - the alias
thirsty
has been removed. Useforce
instead (https://github.com/ansible-collections/community.general/pull/1926).ldap_entry - the
params
parameter is now completely removed. Using it already triggered an error since community.general 0.1.2 (https://github.com/ansible-collections/community.general/pull/2257).pulp_repo - the
feed_client_cert
parameter no longer defaults to the value of theclient_cert
parameter (https://github.com/ansible-collections/community.general/pull/1926).pulp_repo - the
feed_client_key
parameter no longer defaults to the value of theclient_key
parameter (https://github.com/ansible-collections/community.general/pull/1926).pulp_repo - the alias
ca_cert
has been removed. Usefeed_ca_cert
instead (https://github.com/ansible-collections/community.general/pull/1926).rax - unused parameter
service
removed (https://github.com/ansible-collections/community.general/pull/2020).redfish modules - issuing a data modification command without specifying the ID of the target System, Chassis or Manager resource when there is more than one is no longer allowed. Use the
resource_id
option to specify the target ID (https://github.com/ansible-collections/community.general/pull/1926).redfish_config - the parameters
bios_attribute_name
andbios_attribute_value
have been removed. Usebios_attributes
instead (https://github.com/ansible-collections/community.general/pull/1926).syspatch - the
apply
parameter has been removed. This is the default mode, so simply removing it will not change the behavior (https://github.com/ansible-collections/community.general/pull/1926).xbps - the
force
parameter has been removed. It did not have any effect (https://github.com/ansible-collections/community.general/pull/1926).
community.network
The deprecated
community.network.ce_sflow
parameters:rate_limit
,rate_limit_slot
, andforward_enp_slot
have been removed (https://github.com/ansible-collections/community.network/pull/255).The deprecated
community.network.sros
netconf plugin has been removed. Usenokia.sros.md
instead (https://github.com/ansible-collections/community.network/pull/255).
f5networks.f5_modules
Removed TMOS v11 support for bigip_gtm_pool and bigip_gtm_wide_ip modules
Removed quorum and monitor_type parameters in bigip_node module. See porting guides section at https://clouddocs.f5.com/products/orchestration/ansible/devel/usage/porting-guides.html
Removed syslog_settings and pool_settings parameters in bigip_log_destination moduke. See porting guides section at https://clouddocs.f5.com/products/orchestration/ansible/devel/usage/porting-guides.html
fortinet.fortios
Removed module fortios_facts
Removed module fortios_registration_forticare
Removed module fortios_registration_vdom
Removed module fortios_system_config_backup_restore
Removed module fortios_system_vmlicense
Deprecated Features
Ansible-core
Starting in 2.14, shell and command modules will no longer have the option to warn and suggest modules in lieu of commands. The
warn
parameter to these modules is now deprecated and defaults toFalse
. Similarly, theCOMMAND_WARNINGS
configuration option is also deprecated and defaults toFalse
. These will be removed and their presence will become an error in 2.14.apt_key - the parameter
key
does not have any effect, has been deprecated and will be removed in ansible-core version 2.14 (https://github.com/ansible/ansible/pull/70319).psrp - Set the minimum version of
pypsrp
to0.4.0
.
ansible.netcommon
Deprecate cli_parse module and textfsm, ttp, xml, json parser plugins as they are moved to ansible.utils collection (https://github.com/ansible-collections/ansible.netcommon/pull/182 https://github.com/ansible-collections/ansible.utils/pull/28)
cisco.nxos
Deprecated nxos_bgp_af in favour of nxos_bgp_address_family resource module.
Deprecated nxos_bgp_neighbor_af in favour of nxos_bgp_neighbor_address_family resource module.
cloudscale_ch.cloud
The aliases
server_uuids
andserver_uuid
of the servers parameter in the volume module will be removed in version 3.0.0.
community.aws
ec2_eip - formally deprecate the
instance_id
alias fordevice_id
(https://github.com/ansible-collections/community.aws/pull/349).ec2_vpc_endpoint - deprecate the policy_file option and recommend using policy with a lookup (https://github.com/ansible-collections/community.aws/pull/366).
ec2_vpc_endpoint_info - the
query
option has been deprecated and will be removed after 2022-12-01 (https://github.com/ansible-collections/community.aws/pull/346). The ec2_vpc_endpoint_info now defaults to listing information about endpoints. The ability to search for information about available services has been moved to the dedicated moduleec2_vpc_endpoint_service_info
.
community.crypto
acme module_utils - the
acme
module_utils (ansible_collections.community.crypto.plugins.module_utils.acme
) is deprecated and will be removed in community.crypto 2.0.0. Use the new Python modules in theacme
package instead (ansible_collections.community.crypto.plugins.module_utils.acme.xxx
) (https://github.com/ansible-collections/community.crypto/pull/184).acme_account_info - when
retrieve_orders=url_list
,orders
will no longer be returned in community.crypto 2.0.0. Useorder_uris
instead (https://github.com/ansible-collections/community.crypto/pull/178).
community.general
apt_rpm - deprecated invalid parameter alias
update-cache
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).composer - deprecated invalid parameter aliases
working-dir
,global-command
,prefer-source
,prefer-dist
,no-dev
,no-scripts
,no-plugins
,optimize-autoloader
,classmap-authoritative
,apcu-autoloader
,ignore-platform-reqs
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).cpanm - parameter
system_lib
deprecated in favor of usingbecome
(https://github.com/ansible-collections/community.general/pull/2218).github_deploy_key - deprecated invalid parameter alias
2fa_token
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).grove - the option
message
will be removed in community.general 4.0.0. Use the new optionmessage_content
instead (https://github.com/ansible-collections/community.general/pull/1929).homebrew - deprecated invalid parameter alias
update-brew
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).homebrew_cask - deprecated invalid parameter alias
update-brew
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).opkg - deprecated invalid parameter alias
update-cache
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).pacman - deprecated invalid parameter alias
update-cache
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).puppet - deprecated undocumented parameter
show_diff
, will be removed in 7.0.0. (https://github.com/ansible-collections/community.general/pull/1927).runit - unused parameter
dist
marked for deprecation (https://github.com/ansible-collections/community.general/pull/1830).slackpkg - deprecated invalid parameter alias
update-cache
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).urpmi - deprecated invalid parameter aliases
update-cache
andno-recommends
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).xbps - deprecated invalid parameter alias
update-cache
, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).xfconf - returning output as facts is deprecated, this will be removed in community.general 4.0.0. Please register the task output in a variable and use it instead. You can already switch to the new behavior now by using the new
disable_facts
option (https://github.com/ansible-collections/community.general/pull/1747).
community.vmware
vmware_vmkernel_ip_config - deprecate in favor of vmware_vmkernel (https://github.com/ansible-collections/community.vmware/pull/667).
f5networks.f5_modules
Support for Python versions earlier than 3.5 is being deprecated