Table of contents
1.
Introduction
2.
Playbook
3.
Command Line
4.
Deprecated
5.
Modules
5.1.
Modules Removed
5.2.
Deprecation Notices
5.3.
Noteworthy module changes
5.4.
Breaking Changes
6.
Plugins
7.
Porting Custom Scripts
8.
Networking
9.
Porting Guide for v6.6.0
9.1.
Added Collections
9.2.
Known Issues
9.3.
Breaking Changes
9.4.
Major Changes
9.5.
Deprecated Features
10.
Porting Guide for v6.5.0
10.1.
Major Changes
10.2.
Deprecated Features
10.3.
community.general
11.
Porting Guide for v6.4.0
11.1.
Added Collections
11.2.
Deprecated Features
12.
Porting Guide for v6.3.0
12.1.
Major Changes
12.2.
Deprecated Features
13.
Porting Guide for v6.2.0
13.1.
Added Collections
13.2.
Known Issues
13.3.
Major Changes
13.4.
Deprecated Features
14.
Porting Guide for v6.1.0
14.1.
Added Collections
14.2.
Known Issues
14.3.
Major Changes
14.4.
Deprecated Features
15.
Porting Guide for v6.0.0
15.1.
Added Collections
15.2.
Known Issues
15.3.
Breaking Changes
15.4.
Major Changes
15.5.
Removed Collections
15.6.
Removed Features
15.7.
Deprecated Features
16.
Frequently Asked Questions
16.1.
What is Ansible core?
16.2.
Is Ansible still free?
16.3.
Is Ansible CI or CD?
16.4.
Is Red Hat Ansible free?
16.5.
What language is used in Ansible?
17.
Conclusion
Last Updated: Mar 27, 2024
Medium

Ansible 6 Porting Guide

Author soham Medewar
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Ansible is an open-source community project. This project is sponsored by Red Hat. Ansible provides the easiest way to automate IT. Ansible is the sole automation language that can be used across all IT teams. It can be used by entire IT teams, from network and system administrators to managers and developers.

ansible

Now let us learn about Ansible 6 Porting Guide.

Playbook

Templating - Concatenation and arithmetic operations cannot be performed outside the jinja template. You need to rewrite the following statement to produce [2, 1]:

- name: Prior to 2.13
  debug:
    msg: '[2] + {{ [1] }}'
- name: 2.13 and forward
  debug:
    msg: '{{ [2] + [1] }}'


The value returned by the __repr__ method of an undefined variable is changed. This undefined variable is represented by AnsibleUndefined.
The globals no longer offer the finalize method for use in templating. You need to write the following syntax to convert None to an empty string.

{{ value if value is not none }}

Command Line

There are no notable changes in the command line.

Deprecated

There are no notable changes.

Modules

Your system must have Python 3 version 3.5 or Python 2 version 2.7 or newer version to use ansible-core 2.13 for module execution. Any code using the ansible.module_utils.basic won't function with the lower versions of Python.

Modules Removed

No modules were removed.

Deprecation Notices

There are no notable changes.

Noteworthy module changes

There are no notable changes.

Breaking Changes

The ansible.module_utils.urls.fetch_url will now return r as captured HTTPError exception. HTTPError is a response-like object which provides more information to the authors of the module. To determine if there was a failure, modules should depend on info['status'] >= 400. 

Plugins

There are no notable changes in the plugins.

Porting Custom Scripts

There are no notable changes in Porting Custom Scripts.

Networking

There are no notable changes in the Networking section.

Porting Guide for v6.6.0

Added Collections

  • lowlydba.sqlserver (version 1.0.4)

Known Issues

  • community.routeros

Breaking Changes

community.general

  • newrelic_deployment: revision is needed in v2 API.

Major Changes

community.general

  • newrelic_deployment: added support for v2 API and removed New Relic v1 API.

Deprecated Features

The mellanox.onyx collection is supposed to be unmaintained and will be deleted from Ansible 8 if no one starts maintaining this collection again before Ansible 8.

Porting Guide for v6.5.0

Major Changes

Infoblox.nios_modules

  • Features for additional security layer, with key and cert parameters in the playbook. These parameters are used for key *.pem file absolute path and authenticating certificate.
  • Using the Ansible module nios network, resolve the problem caused by the template attr while deleting networks.

Deprecated Features

  • The dellemc.os10, dellemc.os6, and dellemc.os9 collections are considered unmaintained, and they all will be discarded from Ansible 8 if no one starts maintaining them again. 

community.general

  • lxc_container: The module will not try to support Python 2 anymore.

Porting Guide for v6.4.0

Added Collections

  • inspur.ispim (version 1.0.1)
  • vultr.cloud (version 1.1.0)

Deprecated Features

community.general

  • proxmox: The present unprivileged default value has been deprecated and will be changed to true in the community.general 7.0.0.

Porting Guide for v6.3.0

Major Changes

community.mysql

  • mysql_db: The community.mysql 4.0.0 will set true as the default value for the pipefail argument. Set pipefail to false explicitly if bash is not the default interpreter on your target machines. However, we strongly advise putting up bash as the default and pipefail=true, as it will prevent you from receiving damaged dumps that you are unaware of.
     

fortinet.fortios

  • Support Diff feature in check_mode.
  • Support Fortios 7.2.0.

Deprecated Features

  • The google.cloud, and servicenow.servicenow collections are considered unmaintained, and they all will be discarded from Ansible 8 if no one starts maintaining them again. 

Porting Guide for v6.2.0

Added Collections

  • ibm.spectrum_virtualize (version 1.9.0)

Known Issues

netapp.ontap

  • na_ontap_snapshot: added documentation to use the expiry_time in UTC format.

Major Changes

community.postgresql

  • postgresql_user: the groups argument has been discarded and will be eliminated in the community.postgresql 3.0.0. To specify role/group membership, make use of the postgresql_membership module.

Deprecated Features

community.hashi_vault

  • vault_kv2_get lookup: In the vault_kv2_get lookup, the engine_mount_point option will change its default from kv to secret in the community.hashi_vault version 4.0.0.

Porting Guide for v6.1.0

Added Collections

  • purestorage.fusion (version 1.0.2)

Known Issues

dellemc.openmanage

  • ome_application_alerts_smtp: Issue(212310) - If the destination address is longer than 255 characters, then the module does not output a suitable error message.
  • ome_application_alerts_syslog: Issue(215374) - If the destination address is longer than 255 characters, then the module does not output a suitable error message.
  • ome_device_network_services: Issue(212681) - If the parameters are provided with unsupported values, the module fails to produce a valid error message.

Major Changes

chocolatey.chocolatey

  • win_chocolate: The bootstrap_script option is added that allows users to target a script URL. This URL helps in installing Chocolatey on clients.
  • win_chocolatey_facts: Added a list of out-of-date packages to the data returned.


infoblox.nios_modules

  • The text field of the TXT Record is updated. 

Deprecated Features

cisco.ios

  • ios_linkagg_module has been replaced with ios_lag_interfaces.
     

community.aws

  • aws_codebuild: The tags argument has been deprecated and presently utilizes a non-standard format.
  • route53_info:  The CamelCase return values for ResourceRecordSetsHealthChecks, and HostedZones have been deprecated. You must use snake_case return values in the future release.
     

community.crypto

  • Support for ansible-base 2.10 and Ansible 2.9 is deprecated. It will be discarded in the next major release.
     

community.docker

  • Versions 1.20 to 1.24 of the Docker API are deprecated and will be removed from the community.docker 3.0.0. 
  • Python 2.6 support is deprecated and will be discarded in the next major release.
     

community.general

  • cmd_runner module utilsfmt has been replaced with cmd_runner_fmt as the parameter format object. 

Porting Guide for v6.0.0

Added Collections

  • cisco.dnac (version 6.4.0)
  • community.sap (version 1.0.0)
  • community.sap_libs (version 1.1.0)
  • vmware.vmware_rest (version 2.1.5)

Known Issues

Ansible-core

  • get_url: document check_mode accurately with the unreliable changed status.
     

ansible.netcommon

  • eos: With import_modules enabled, the tasks using eos modules on Ansible 2.9 will occasionally fail.
     

community.general

  • pacmanupdate_cache is unable to differentiate between outdated and up-to-date package lists. It will report changed in both situations.
     

dellemc.openmanage

  • idrac_userIssue(192043).
  • ome_application_alerts_smtp: Issue(212310) - If the destination_address exceeds the length of 255 characters, then module does not give the proper output.
     

purestorage.flasharray

  • purefa_admin: There is presently just one way to reset max_login and lockout to zero, and that is through the FlashArray GUI.

Breaking Changes

Ansible-core

  • Module python dependency: Python 2.6 support in module execution is dropped.
     

amazon.aws

  • aws_caller_facts: Use aws_caller_info instead of using deprecated aws_caller_facts.
  • cloudformation_facts: Use cloudformation_info instead of using deprecated cloudformation_facts.
     

ansible.netcommon

  • httpapi: the default value of the import_modules option is changed from no to yes.
  • netconf: the default value of the import_modules option is changed from no to yes.
  • network_cli: the default value of the import_modules option is changed from no to yes.
     

arista.eos 

  • httpapi: now the datatype of the eos_use_sessions option is a boolean instead of an integer.
     

community.aws

  • aws_acm_facts: Use aws_acm_info instead of using deprecated aws_acm_facts.
  • aws_kms_facts: Use aws_kms_info instead of using deprecated aws_kms_facts.
     

dellemc.openmanage

  • The modification of the existing playbooks is necessary since HTTPS SSL certificate validation is a breaking change. For information on how to modify current playbooks, please see the README.md section on SSL Certificate Validation.
     

community.mysql

  • mysql_replication: The return values of Is_Slave and Is_Master are removed.
  • mysql_replication: The mode options values containing slave/master and the master_use_gtid option slave_pos are removed.
     

theforeman.foreman

  • For the inventory plugin, set the default value of use_reports_api to true.
  • Ansible 2.8 support has been discontinued.

Major Changes

Add the ansible_community CLI tool, which enables printing the Ansible community distribution version.
 

Ansible-core

  • Jinja2 Controller Requirement: New version of Jinja2 (version >= Jinja2 3.0.0) is required for the control node.
     

amazon.aws

  • amazon.aws collection: The support for botocore<1.19.0 and boto3<1.16.0 has been dropped by amazon.aws. Most of the modules will work with the older versions.
     

fortinet.fortios

  • Support FortiOS 7.0.5, 7.0.4, 7.0.3, 7.0.2.
     

frr.frr

  • Minimum acceptable version 2.5.1 of ansible.netcommon is used.
  • Base plugin references to ansible.netcommon have been updated.
     

ibm.qradar

  • Minimum acceptable version 2.5.1 of ansible.netcommon is used.
  • Base plugin references to ansible.netcommon have been updated.
     

junipernetworks.junos

  • Minimum acceptable version 2.5.1 of ansible.netcommon is used.
  • Base plugin references to ansible.netcommon have been updated.
  • junos_facts: change default gather_subset to the min from !config.
     

ovirt.ovirt

  • manageiq: this role is removed.
     

splunk.es

  • Minimum acceptable version 2.5.1 of ansible.netcommon is used.
  • Base plugin references to ansible.netcommon have been updated.
     

vyos.vyos

  • Add ‘pool’ as value to server key in ntp_global.
  • Minimum acceptable version 2.5.1 of ansible.netcommon is used.
  • Base plugin references to ansible.netcommon have been updated.

Removed Collections

  • community.kubernetes (previously included version: 2.0.1)
  • community.kubevirt (previously included version: 1.0.0)

Removed Features

  • The community.kubernetes collection has been discarded from Ansible 6. Since Ansible 4.2 and version 2.0.0, the community.kubernetes collection has been deprecated.
  • The community.kubevirt collection has been discarded from Ansible 6.
     

Ansible-core

  • Deprecated Templar.set_available_variables() method is removed.
  • copy: Deprecated thirsty alias is removed.
     

community.general

  • apt-rpm: the deprecated alias update-cache of update_cache is removed.
  • linode: the backupenabled option is removed. Use backupwindow or backupweeklyday to enable backup.

Deprecated Features

  • The community.sap collection is renamed to community.sap_libs. Both collections are included in Ansible. 

Ansible-core

  • ansible-test: the support for Python2.6 is removed.
  • ansible-core: the support for Python2.6 is removed.
  • scp_if_ssh, the plugin option of ssh connection is in favor of ssh_transfer_method.


cisco.ios

  • The lldp module is deprecated.
  • ios_acls: Deprecated fragment attribute added boolean alternate as enable_fragment.


cisco.nxos

  • The nxos_snmp_community, nxos_snmp_contact, nxos_snmp_host, nxos_snmp_location, nxos_snmp_traps, and nxos_snmp_user modules are deprecated.


junipernetworks.junos

  • The ‘router_id’ from the junos_ospfv2, junos_ospfv3, and junos_ospf_interfaces resource module is deprecated. 


purestorage.flasharray

Frequently Asked Questions

What is Ansible core?

Ansible Core is a command-line tool that is typically used by users and developers who want to configure only the collections they actually require.

Is Ansible still free?

As it is open-source, it is free to use.

Is Ansible CI or CD?

Ansible is both CI/CD solution as it provides numerous tools and features.

Is Red Hat Ansible free?

The red hat ansible is the paid product.

What language is used in Ansible?

Ansible majorly uses three programming languages, i.e., Python, PowerShell, and Ruby.

Conclusion

In this article, we have covered all the major points of the Ansible 6 porting guide. You can also refer to the official documentation of Ansible for more information.

You can also refer to other similar articles.


Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enrol in our courses and refer to the mock test and problems available. Take a look at the interview experiences and interview bundle for placement preparations.

Happy Learning Ninja!

Live masterclass