Ansible 2.3 Porting Guide

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

    In Ansible 2.2 (and possibly earlier) the async: keyword could not be used in conjunction with the action plugins such as service. This limitation has been removed in Ansible 2.3

    NEW In Ansible 2.3:

    OpenBSD version facts

    The ansible_distribution_release and ansible_distribution_version facts on OpenBSD hosts were reversed in Ansible 2.2 and earlier. This has been changed so that version has the numeric portion and release has the name of the release.

    OLD In Ansible 2.2 (and earlier)

    1. "ansible_distribution": "OpenBSD"
    2. "ansible_distribution_version": "release",

    NEW In Ansible 2.3:

    Names Blocks

    Blocks can now have names, this allows you to avoid the ugly # this block is for… comments.

    1. - name: Block test case
    2. hosts: localhost
    3. tasks:
    4. - name: Attempt to setup foo
    5. block:
    6. - debug: msg='I execute normally'
    7. - command: /bin/false
    8. - debug: msg='I never execute, cause ERROR!'
    9. rescue:
    10. - debug: msg='I caught an error'
    11. - command: /bin/false
    12. - debug: msg='I also never execute :-('
    13. always:
    14. - debug: msg="this always executes"

    Specifying (or —skip-tags) multiple times on the command line currently leads to the last specified tag overriding all the other specified tags. This behaviour is deprecated. In the future, if you specify –tags multiple times the tags will be merged together. From now on, using —tags multiple times on one command line will emit a deprecation warning. Setting the merge_multiple_cli_tags option to True in the file will enable the new behaviour.

    In 2.4, the default will be to merge the tags. You can enable the old overwriting behavior via the config option.In 2.5, multiple —tags options will be merged with no way to go back to the old behaviour.

    Other caveats

    Here are some rare cases that might be encountered when updating. These are mostly caused by the more stringent parser validation and the capture of errors that were previously ignored.

    • Made any_errors_fatal inheritable from play to task and all other objects in between.

    No major changes in this version.

    Modules removed

    No major changes in this version.

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

    • ec2_vpc
    • cl_bond
    • cl_img_install
    • cl_interface
    • cl_interface_policy
    • cl_license
    • cl_ports
    • nxos_mtu use instead

    Note

    These modules may no longer have documentation in the current release. Please see theAnsible 2.3 module documentation if you needto know how they worked for porting your playbooks.

    Noteworthy module changes

    AWS lambda

    Previously ignored changes that only affected one parameter. Existing deployments may have outstanding changes that this bug fix will apply.

    Mount

    No major changes in this version.

    No major changes in this version.

    There have been a number of changes to number of changes to how Networking Modules operate.

    Playbooks should still use connection: local.

    The following changes apply to:

    • dellos6
    • dellos9
    • dellos10
    • eos
    • ios
    • iosxr
    • junos
    • sros
    • vyos

    Deprecation of top-level connection arguments

    OLD In Ansible 2.2:

    Will result in:

    1. [WARNING]: argument username has been deprecated and will be removed in a future version
    2. [WARNING]: argument host has been deprecated and will be removed in a future version
    3. [WARNING]: argument password has been deprecated and will be removed in a future version

    NEW In Ansible 2.3:

    The new connection framework for Network Modules in Ansible 2.3 that uses transportno longer supports the use of the delegate_to directive.In order to use a bastion or intermediate jump host to connect to network devices over clitransport, network modules now support the use of ProxyCommand.

    For details on how to do this see the .