Ansible 2.10 Porting Guide

This section discusses the behavioral changes between Ansible 2.9 and Ansible 2.10.

It is intended to assist in updating your playbooks, plugins and other parts of your Ansible infrastructure so they will work with this version of Ansible.

We suggest you read this page along with Ansible Changelog for 2.10 to understand what updates you may need to make.

This document is part of a collection on porting. The complete list of porting guides can be found at porting guides.

Playbook

No notable changes

Command Line

No notable changes

Deprecated

Modules

Modules removed

The following modules no longer exist:

Deprecation notices

The following modules will be removed in Ansible 2.14. Please update your playbooks accordingly.

The following functionality will be removed in Ansible 2.14. Please update update your playbooks accordingly.

  • The openssl_csr module’s option version no longer supports values other than 1 (the current only standardized CSR version).
  • docker_container: the trust_image_content option will be removed. It has always been ignored by the module.
  • iam_managed_policy: the fail_on_delete option will be removed. It has always been ignored by the module.
  • s3_lifecycle: the requester_pays option will be removed. It has always been ignored by the module.
  • s3_sync: the retries option will be removed. It has always been ignored by the module.
  • The return values err and out of docker_stack have been deprecated. Use stdout and stderr from now on instead.
  • cloudformation: the template_format option will be removed. It has been ignored by the module since Ansible 2.3.
  • data_pipeline: the version option will be removed. It has always been ignored by the module.
  • ec2_eip: the wait_timeout option will be removed. It has had no effect since Ansible 2.3.
  • ec2_key: the wait option will be removed. It has had no effect since Ansible 2.5.
  • ec2_key: the wait_timeout option will be removed. It has had no effect since Ansible 2.5.
  • ec2_lc: the associate_public_ip_address option will be removed. It has always been ignored by the module.
  • iam_policy: the policy_document option will be removed. To maintain the existing behavior use the policy_json option and read the file with the lookup plugin.
  • redfish_config: the bios_attribute_name and bios_attribute_value options will be removed. To maintain the existing behavior use the bios_attributes option instead.
  • clc_aa_policy: the wait parameter will be removed. It has always been ignored by the module.
  • redfish_config, redfish_command: the behavior to select the first System, Manager, or Chassis resource to modify when multiple are present will be removed. Use the new resource_id option to specify target resource to modify.

The following functionality will change in Ansible 2.14. Please update update your playbooks accordingly.

  • The docker_container module has a new option, container_default_behavior, whose default value will change from compatibility to no_defaults. Set to an explicit value to avoid deprecation warnings.
  • The docker_container module’s network_mode option will be set by default to the name of the first network in networks if at least one network is given and networks_cli_compatible is true (will be default from Ansible 2.12 on). Set to an explicit value to avoid deprecation warnings if you specify networks and set networks_cli_compatible to true. The current default (not specifying it) is equivalent to the value default.
  • iam_policy: the default value for the skip_duplicates option will change from true to false. To maintain the existing behavior explicitly set it to true.
  • iam_role: the purge_policies option (also know as purge_policy) default value will change from true to false
  • elb_network_lb: the default behaviour for the state option will change from absent to present. To maintain the existing behavior explicitly set state to absent.
  • vmware_tag_info: the module will not return tag_facts since it does not return multiple tags with the same name and different category id. To maintain the existing behavior use tag_info which is a list of tag metadata.

The following modules will be removed in Ansible 2.14. Please update your playbooks accordingly.

Noteworthy module changes

  • vmware_datastore_maintenancemode now returns datastore_status instead of Ansible internal key results.
  • vmware_host_kernel_manager now returns host_kernel_status instead of Ansible internal key results.
  • vmware_host_ntp now returns host_ntp_status instead of Ansible internal key results.
  • vmware_host_service_manager now returns host_service_status instead of Ansible internal key results.
  • vmware_tag now returns tag_status instead of Ansible internal key results.
  • The deprecated recurse option in pacman module has been removed, you should use extra_args=--recursive instead.
  • vmware_guest_custom_attributes module does not require VM name which was a required parameter for releases prior to Ansible 2.10.
  • zabbix_action no longer requires esc_period and event_source arguments when state=absent.
  • gitlab_user no longer requires name, email and password arguments when state=absent.
  • win_pester no longer runs all *.ps1 file in the directory specified due to it executing potentially unknown scripts. It will follow the default behaviour of only running tests for files that are like *.tests.ps1 which is built into Pester itself
  • win_find has been refactored to better match the behaviour of the find module. Here is what has changed:
    • When the directory specified by paths does not exist or is a file, it will no longer fail and will just warn the user
    • Junction points are no longer reported as islnk, use isjunction to properly report these files. This behaviour matches the win_stat
    • Directories no longer return a size, this matches the stat and find behaviour and has been removed due to the difficulties in correctly reporting the size of a directory

Plugins

Noteworthy plugin changes

  • The hashi_vault lookup plugin now returns the latest version when using the KV v2 secrets engine. Previously, it returned all versions of the secret which required additional steps to extract and filter the desired version.

Porting custom scripts

No notable changes

Networking

No notable changes