Ansible 6 is based on Ansible-core 2.13.
We suggest you read this page along with the Ansible 6 Changelog to understand what updates you may need to make.
[1, 2]:- name: Prior to 2.13
debug:
msg: '[1] + {{ [2] }}'
- name: 2.13 and forward
debug:
msg: '{{ [1] + [2] }}'
__repr__ method of an undefined variable represented by the AnsibleUndefined object changed. {{ '%r'|format(undefined_variable) }} returns AnsibleUndefined(hint=None, obj=missing, name='undefined_variable') in 2.13 as opposed to just AnsibleUndefined in versions 2.12 and prior.finalize method is no longer exposed in the globals for use in templating. To convert None to an empty string the following expression can be used: {{ value if value is not none }}.No notable changes
No notable changes
ansible.module_utils.basic will not function with lower Python versions.The following modules no longer exist:
No notable changes
No notable changes
ansible.module_utils.urls.fetch_url will now return the captured HTTPError exception as r. HTTPError is a response like object that can offer more information to module authors. Modules should rely on info['status'] >= 400 to determine if there was a failure, instead of using r is None or catching AttributeError when attempting r.read().No notable changes
No notable changes
No notable changes
queue tree are defined as human readable - for example 25M -, the configuration will be correctly set in ROS, but the module will indicate the item is changed on every run even when there was no change done. This is caused by the ROS API which returns the number in bytes - for example 25000000 (which is inconsistent with the CLI behavior). In order to mitigate that, the limits have to be defined in bytes (those will still appear as human readable in the ROS CLI) (https://github.com/ansible-collections/community.routeros/pull/131).routing ospf area, routing ospf area range, routing ospf instance, routing ospf interface-template paths are not fully implemented for ROS6 due to the significant changes between ROS6 and ROS7 (https://github.com/ansible-collections/community.routeros/pull/131).ansible-doc --list --type module, suggest to replace the correct FQCNs for modules and actions in community.general with internal names that have more than three components. For example, community.general.ufw is suggested to be replaced by community.general.system.ufw. While these longer names do work, they are considered internal names by the collection and are subject to change and be removed at all time. They will be removed in community.general 6.0.0 and result in deprecation messages. Avoid using these internal names, and use general three-component FQCNs (community.general.<name_of_module>) instead (https://github.com/ansible-collections/community.general/pull/5373).community.routeros.command module claims to support check mode. Since it cannot judge whether the commands executed modify state or not, this behavior is incorrect. Since this potentially breaks existing playbooks, we will not change this behavior until community.routeros 3.0.0.revision is required for v2 API (https://github.com/ansible-collections/community.general/pull/5341).CmdMixin, in favor of the cmd_runner_fmt module util (https://github.com/ansible-collections/community.general/pull/5370).CmdRunner module util (https://github.com/ansible-collections/community.general/pull/5370).CmdRunner module util (https://github.com/ansible-collections/community.general/pull/5370).CmdRunner module util (https://github.com/ansible-collections/community.general/pull/5370).cleanup, syncdb and validate that have been deprecated in Django long time ago will be removed in community.general 9.0.0 (https://github.com/ansible-collections/community.general/pull/5400).appname and environment are no longer valid options in the v2 API. They will be removed in community.general 7.0.0 (https://github.com/ansible-collections/community.general/pull/5341).unprivileged default value, will be changed to true in community.general 7.0.0 (https://github.com/pull/5224).pipefail argument’s default value will be changed to true in community.mysql 4.0.0. If your target machines do not use bash as a default interpreter, set pipefail to false explicitly. However, we strongly recommend setting up bash as a default and pipefail=true as it will protect you from getting broken dumps you don’t know about (https://github.com/ansible-collections/community.mysql/issues/407).expiry_time.groups argument has been deprecated and will be removed in community.postgresql 3.0.0. Please use the postgresql_membership module to specify group/role memberships instead (https://github.com/ansible-collections/community.postgresql/issues/277).engine_mount_point option in the vault_kv2_get lookup only will change its default from kv to secret in community.hashi_vault version 4.0.0 (https://github.com/ansible-collections/community.hashi_vault/issues/279).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.Successfully updated the local access setting if an unsupported value is provided for the parameter timeout_limit. However, this value is not actually applied on OpenManage Enterprise Modular.power_cap is not within the supported range of 0 to 32767, Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.
tags parameter currently uses a non-standard format and has been deprecated. In release 6.0.0 this parameter will accept a simple key/value pair dictionary instead of the current list of dictionaries. It is recommended to migrate to using the resource_tags parameter which already accepts the simple dictionary format (https://github.com/ansible-collections/community.aws/pull/1221).HostedZones, ResourceRecordSets, and HealthChecks have been deprecated, in the future release you must use snake_case return values hosted_zones, resource_record_sets, and health_checks instead respectively”.docker_container, docker_container_exec, docker_container_info, docker_compose, docker_login, docker_image, docker_image_info, docker_image_load, docker_host_info, docker_network, docker_network_info, docker_node_info, docker_swarm_info, docker_swarm_service, docker_swarm_service_info, docker_volume_info, and docker_volume, whose minimally supported API version is between 1.20 and 1.24 (https://github.com/ansible-collections/community.docker/pull/396).fmt in favour of cmd_runner_fmt as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777).check_mode correctly with unreliable changed status (https://github.com/ansible/ansible/issues/65687).import_modules enabled. This can be avoided by setting import_modules: no
update_cache cannot differentiate between up to date and outdated package lists and will report changed in both situations (https://github.com/ansible-collections/community.general/pull/4318).executable parameter must support --print-format in order to be used by this module. In particular, AUR helper yay is known not to currently support it (https://github.com/ansible-collections/community.general/pull/4312).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.Successfully updated the local access setting if an unsupported value is provided for the parameter timeout_limit. However, this value is not actually applied on OpenManage Enterprise Modular.power_cap is not within the supported range of 0 to 32767, Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.
power_cap is not within the supported range of 0 to 32767, Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.
power_cap is not within the supported range of 0 to 32767, Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.
max_login and lockout have been set there is currently no way to rest these to zero except through the FlashArray GUIfinalize method is no longer exposed in the globals for use in templating.aws_caller_facts alias. Please use aws_caller_info instead.cloudformation_facts alias. Please use cloudformation_info instead.ec2_ami_facts alias. Please use ec2_ami_info instead.ec2_eni_facts alias. Please use ec2_eni_info instead.ec2_group_facts alias. Please use ec2_group_info instead.ec2_instance_facts alias. Please use ec2_instance_info instead.ec2_snapshot_facts alias. Please use ec2_snapshot_info instead.ec2_vol_facts alias. Please use ec2_vol_info instead.ec2_vpc_dhcp_option_facts alias. Please use ec2_vpc_dhcp_option_info instead.ec2_vpc_endpoint_facts alias. Please use ec2_vpc_endpoint_info instead.ec2_vpc_igw_facts alias. Please use ec2_vpc_igw_info instead.ec2_vpc_nat_gateway_facts alias. Please use ec2_vpc_nat_gateway_info instead.ec2_vpc_net_facts alias. Please use ec2_vpc_net_info instead.ec2_vpc_route_table_facts alias. Please use ec2_vpc_route_table_info instead.ec2_vpc_subnet_facts alias. Please use ec2_vpc_subnet_info instead.import_modules option from no to yes
import_modules option from no to yes
import_modules option from no to yes
version of parameter command, which controls the JSON response version. Previously the value was assumed to be “latest” for network_cli and “1” for httpapi, but the default will now be “latest” for both connections. This option is also available for use in modules making their own device requests with plugins.module_utils.network.eos.eos.run_commands() with the same new default behavior. (https://github.com/ansible-collections/arista.eos/pull/258).eos_use_sessions option is now a boolean instead of an integer.aws_acm_facts. Please use aws_acm_info instead.aws_kms_facts. Please use aws_kms_info instead.keys_attr field is now ignored (https://github.com/ansible-collections/community.aws/pull/838).aws_region_facts. Please use aws_region_info instead.aws_s3_bucket_facts. Please use aws_s3_bucket_info instead.aws_sgw_facts. Please use aws_sgw_info instead.aws_waf_facts. Please use aws_waf_info instead.cloudfront_facts. Please use cloudfront_info instead.cloudwatchlogs_log_group_facts. Please use cloudwatchlogs_log_group_info instead.ec2_asg_facts. Please use ec2_asg_info instead.ec2_customer_gateway_facts. Please use ec2_customer_gateway_info instead.ec2_eip_facts. Please use ec2_eip_info instead.ec2_elb_facts. Please use ec2_elb_info instead.ec2_elb_info module has been removed. Please use the ``elb_classic_lb_info module.ec2_lc_facts. Please use ec2_lc_info instead.ec2_placement_group_facts. Please use ec2_placement_group_info instead.ec2_vpc_nacl_facts. Please use ec2_vpc_nacl_info instead.ec2_vpc_peering_facts. Please use ec2_vpc_peering_info instead.ec2_vpc_route_table_facts. Please use ec2_vpc_route_table_info instead.ec2_vpc_vgw_facts. Please use ec2_vpc_vgw_info instead.ec2_vpc_vpn_facts. Please use ec2_vpc_vpn_info instead.ecs_service_facts. Please use ecs_service_info instead.ecs_taskdefinition_facts. Please use ecs_taskdefinition_info instead.efs_facts. Please use efs_info instead.elasticache_facts. Please use elasticache_info instead.elb_application_lb_facts. Please use elb_application_lb_info instead.elb_classic_lb_facts. Please use elb_classic_lb_info instead.elb_target_facts. Please use elb_target_info instead.elb_target_group_facts. Please use elb_target_group_info instead.community.aws.iam module. Please use community.aws.iam_user, community.aws.iam_access_key or community.aws.iam_group (https://github.com/ansible-collections/community.aws/pull/839).iam_cert_facts. Please use iam_cert_info instead.iam_mfa_device_facts. Please use iam_mfa_device_info instead.iam_role_facts. Please use iam_role_info instead.iam_server_certificate_facts. Please use iam_server_certificate_info instead.lambda_info instead.community.aws.rds module. Please use community.aws.rds_instance (https://github.com/ansible-collections/community.aws/pull/839).rds_instance_facts. Please use rds_instance_info instead.rds_snapshot_facts. Please use rds_snapshot_info instead.redshift_facts. Please use redshift_info instead.route53_facts. Please use route53_info instead.meta/runtime.yml redirects. This effectively breaks compatibility with Ansible 2.9 for all modules (without using their “long” names, which is discouraged and which can change without previous notice since they are considered an implementation detail) (https://github.com/ansible-collections/community.general/pull/4548).--no-emoji flag (https://github.com/ansible-collections/community.general/pull/4662).Is_Slave and Is_Master return values (were replaced with Is_Primary and Is_Replica (https://github.com/ansible-collections /community.mysql/issues/145).master/slave and the master_use_gtid option slave_pos (were replaced with corresponding primary/replica values) (https://github.com/ansible-collections/community.mysql/issues/145).REQUIRESSL special privilege as it has ben superseded by the tls_requires option (https://github.com/ansible-collections/community.mysql/discussions/121).enable has been changed from false to true.enable_drs has been removed, use enable instead.enable has been changed from false to true.enable_ha has been removed, use enable instead.enable has been changed from false to true.enable_vsan has been removed, use enable instead.nested_virt, secure_boot and iommu) that the module silently enabled. They have to be enabled explicitly now.ansible-community CLI tool that allows to print the version of the Ansible community distribution. Use ansible-community --version to print this version.safe_eval in favor of using NativeEnvironment but utilizing literal_eval only in cases when safe_eval was used (https://github.com/ansible/ansible/pull/75587)botocore<1.19.0 and boto3<1.16.0. Most modules will continue to work with older versions of the AWS SDK, however compatibility with older versions of the SDK is not guaranteed and will not be tested. When using older versions of the SDK a warning will be emitted by Ansible (https://github.com/ansible-collections/amazon.aws/pull/574).ansible.netcommon.cli_parse will continue to work to reference the module in its new location, but this redirect will be removed in a future releasessh_type option from paramiko to auto. This value will use libssh if the ansible-pylibssh module is installed, otherwise will fallback to paramiko.eos_facts - change default gather_subset to min from !config (https://github.com/ansible-collections/arista.eos/issues/306).facts - default value for gather_subset is changed to min instead of !config.nxos_facts - change default gather_subset to min from !config (https://github.com/ansible-collections/cisco.nxos/issues/418).botocore<1.19.0 and boto3<1.16.0. Most modules will continue to work with older versions of the AWS SDK, however compatibility with older versions of the SDK is not guaranteed and will not be tested. When using older versions of the SDK a warning will be emitted by Ansible (https://github.com/ansible-collections/community.aws/pull/809).Ansible 2.9 and ansible-base 2.10. While we take no active measures to prevent usage and there are no plans to introduce incompatible code to the modules, we will stop testing against Ansible 2.9 and ansible-base 2.10. Both will very soon be End of Life and if you are still using them, you should consider upgrading to the latest Ansible / ansible-core 2.11 or later as soon as possible (https://github.com/ansible-collections/community.mysql/pull/343).Ansible 2.9 and ansible-base 2.10. While we take no active measures to prevent usage and there are no plans to introduce incompatible code to the modules, we will stop testing against Ansible 2.9 and ansible-base 2.10. Both will very soon be End of Life and if you are still using them, you should consider upgrading to the latest Ansible / ansible-core 2.11 or later as soon as possible (https://github.com/ansible-collections/community.postgresql/pull/245).usage_on_types feature have been deprecated and will be removed in community.postgresql 3.0.0. Please use the type option with the type value to explicitly grant/revoke privileges on types (https://github.com/ansible-collections/community.postgresql/issues/207).path_to_script and as_single_query options as well as the query_list and query_all_results return values have been deprecated and will be removed in community.postgresql 3.0.0. Please use the community.postgresql.postgresql_script module to execute statements from scripts (https://github.com/ansible-collections/community.postgresql/issues/189).as_single_query option changes to yes. If the related behavior of your tasks where the module is involved changes, please adjust the parameter’s value correspondingly (https://github.com/ansible-collections/community.postgresql/issues/85).priv argument has been deprecated and will be removed in community.postgresql 3.0.0. Please use the postgresql_privs module to grant/revoke privileges instead (https://github.com/ansible-collections/community.postgresql/issues/212).junos_facts - change default gather_subset to min from !config.vyos_facts - change default gather_subset to min from !config (https://github.com/ansible-collections/vyos.vyos/issues/231).ansible-galaxy collection install community.kubernetes (https://github.com/ansible-community/community-topics/issues/93).ansible-galaxy collection install community.kubevirt 'community.kubernetes:<2.0.0' (https://github.com/ansible-community/community-topics/issues/92).Templar.set_available_variables() method (https://github.com/ansible/ansible/issues/75828)thirsty alias (https://github.com/ansible/ansible/issues/75824)put_file with older pypsrp versions. Users must have at least pypsrp>=0.4.0.thirsty alias for get_url and uri modules (https://github.com/ansible/ansible/issues/75825, https://github.com/ansible/ansible/issues/75826)availability_zone, instance_ids, and instance_names. Use filter item zone_id instead of availability_zone, filter item instance_ids instead of instance_ids, and filter item instance_name instead of instance_names (https://github.com/ansible-collections/community.general/pull/4516).update-cache of update_cache (https://github.com/ansible-collections/community.general/pull/4516)._ instead of - instead (https://github.com/ansible-collections/community.general/pull/4516).2fa_token of otp (https://github.com/ansible-collections/community.general/pull/4516).update-brew of update_brew (https://github.com/ansible-collections/community.general/pull/4516).backupsenabled option. Use backupweeklyday or backupwindow to enable backups (https://github.com/ansible-collections/community.general/pull/4516).update-cache of update_cache (https://github.com/ansible-collections/community.general/pull/4516).update_cache=true is used with name or upgrade, the changed state will now also indicate if only the cache was updated. To keep the old behavior - only indicate changed when a package was installed/upgraded -, use changed_when as indicated in the module examples (https://github.com/ansible-collections/community.general/pull/4516).update-cache of update_cache (https://github.com/ansible-collections/community.general/pull/4516).functions option. It was not used by the module (https://github.com/ansible-collections/community.general/pull/4516).update-cache of update_cache (https://github.com/ansible-collections/community.general/pull/4516).no-recommends of no_recommends (https://github.com/ansible-collections/community.general/pull/4516).update-cache of update_cache (https://github.com/ansible-collections/community.general/pull/4516).update-cache of update_cache (https://github.com/ansible-collections/community.general/pull/4516).get state has been removed. Use the xfconf_info module instead (https://github.com/ansible-collections/community.general/pull/4516).aws_iam_login for the aws_iam value of the auth_method option has been removed (https://github.com/ansible-collections/community.hashi_vault/issues/194).[lookup_hashi_vault] INI config section has been removed in favor of the collection-wide [hashi_vault_collection] section (https://github.com/ansible-collections/community.hashi_vault/issues/179).connection: local support. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).provider option. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).connection: local support. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).provider option. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).connection: local support. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).provider option. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).connection: local support. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).provider option. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).connection: local support. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).provider option. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).connection: local support. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).provider option. Use connection: network_cli instead (https://github.com/ansible-collections/community.network/pull/440).vcenter_extension_facts has been removed, use vcenter_extension_info instead.vmware_about_facts has been removed, use vmware_about_info instead.vmware_category_facts has been removed, use vmware_category_info instead.vmware_cluster_drs.vmware_cluster_ha.vmware_cluster_vsan.vmware_cluster_facts has been removed, use vmware_cluster_info instead.vmware_datastore_facts has been removed, use vmware_datastore_info instead.vmware_drs_group_facts has been removed, use vmware_drs_group_info instead.vmware_drs_rule_facts has been removed, use vmware_drs_rule_info instead.portgroup_type has been removed, use port_binding instead.vmware_dvs_portgroup_facts has been removed, use vmware_dvs_portgroup_info instead.vmware_guest_boot_facts has been removed, use vmware_guest_boot_info instead.vmware_guest_customization_facts has been removed, use vmware_guest_customization_info instead.vmware_guest_disk_facts has been removed, use vmware_guest_disk_info instead.vmware_guest_facts has been removed, use vmware_guest_info instead.vmware_guest_snapshot_facts has been removed, use vmware_guest_snapshot_info instead.vmware_host_capability_facts has been removed, use vmware_host_capability_info instead.vmware_host_config_facts has been removed, use vmware_host_config_info instead.vmware_host_dns_facts has been removed, use vmware_host_dns_info instead.vmware_host_feature_facts has been removed, use vmware_host_feature_info instead.vmware_host_firewall_facts has been removed, use vmware_host_firewall_info instead.vmware_host_ntp_facts has been removed, use vmware_host_ntp_info instead.vmware_host_package_facts has been removed, use vmware_host_package_info instead.vmware_host_service_facts has been removed, use vmware_host_service_info instead.vmware_host_ssl_facts has been removed, use vmware_host_ssl_info instead.vmware_host_vmhba_facts has been removed, use vmware_host_vmhba_info instead.vmware_host_vmnic_facts has been removed, use vmware_host_vmnic_info instead.vmware_local_role_facts has been removed, use vmware_local_role_info instead.vmware_local_user_facts has been removed, use vmware_local_user_info instead.vmware_portgroup_facts has been removed, use vmware_portgroup_info instead.vmware_resource_pool_facts has been removed, use vmware_resource_pool_info instead.vmware_tag_facts has been removed, use vmware_tag_info instead.vmware_target_canonical_facts has been removed, use vmware_target_canonical_info instead.vmware_vm_facts has been removed, use vmware_vm_info instead.vmware_vmkernel_facts has been removed, use vmware_vmkernel_info instead.vmware_vmkernel_ip_config has been removed, use vmware_vmkernel instead.vmware_vswitch_facts has been removed, use vmware_vswitch_info instead.community.sap has been renamed to community.sap_libs. For now both collections are included in Ansible. The content in community.sap will be replaced with deprecated redirects to the new collection in Ansible 7.0.0, and these redirects will eventually be removed from Ansible. Please update your FQCNs for community.sap.`instance_type` has been deprecated, in the future release you must set an instance_type or a launch_template (https://github.com/ansible-collections/amazon.aws/pull/587).boto has been deprecated in favour of the boto3/botocore SDK. All boto based modules have either been deprecated or migrated to botocore, and the remaining support code in module_utils will be removed in release 4.0.0 of the amazon.aws collection. Any modules outside of the amazon.aws and community.aws collections based on the boto library will need to be migrated to the boto3/botocore libraries (https://github.com/ansible-collections/amazon.aws/pull/575).tls_hostname that was supposed to be removed in community.docker 2.0.0 will now be removed in version 3.0.0 (https://github.com/ansible-collections/community.docker/pull/362).out and err that were supposed to be removed in community.docker 2.0.0 will now be removed in version 3.0.0 (https://github.com/ansible-collections/community.docker/pull/362).ansible 2.9 and ansible-base 2.10 (https://github.com/ansible-collections/community.general/pull/4601).DLV record type has been decommissioned in 2017 and support for it will be removed from community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4618).norc option has been deprecated and will change to true in community.general 6.0.0. Explicitly specify a value to avoid a deprecation warning (https://github.com/ansible-collections/community.general/pull/4517).sender is deprecated and will be disallowed in community.general 6.0.0 (https://github.com/ansible-collections/community.general/pull/4140).ModuleHelper.VarDict (https://github.com/ansible-collections/community.general/pull/3801).false in community.general 7.0.0, as this is also the default in nmcli (https://github.com/ansible-collections/community.general/pull/4334).changed status of update_cache will no longer be ignored if name or upgrade is specified. To keep the old behavior, add something like register: result and changed_when: result.packages | length > 0 to your task (https://github.com/ansible-collections/community.general/pull/4329).true of the want_proxmox_nodes_ansible_host option has been deprecated. The default will change to false in community.general 6.0.0. To keep the current behavior, explicitly set want_proxmox_nodes_ansible_host to true in your inventory configuration. We suggest to already switch to the new behavior by explicitly setting it to false, and by using compose: to set ansible_host to the correct value. See the examples in the plugin documentation for details (https://github.com/ansible-collections/community.general/pull/4466).debug that was not used anywhere (https://github.com/ansible-collections/community.general/pull/4580).aws_iam_login method has been renamed to aws_iam. The old name will be removed in collection version 3.0.0. Until then both names will work, and a warning will be displayed when using the old name (https://github.com/ansible-collections/community.hashi_vault/pull/193).token_validate will change its default from True to False in community.hashi_vault version 4.0.0. The vault_login lookup and module will keep the default value of True (https://github.com/ansible-collections/community.hashi_vault/issues/248).token_validate will change its default from true to false in community.hashi_vault version 4.0.0. The vault_login lookup and module will keep the default value of true (https://github.com/ansible-collections/community.hashi_vault/issues/248).
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_6.html