Table of contents
1.
Introduction🎯
2.
Ansible💻
3.
Playbook⭕
4.
Command Line
5.
Deprecated📌
6.
Breaking Changes
7.
Some Important Points⭕
8.
Plugins🎯
8.1.
📌Callback plugins
8.2.
📌Inventory plugins
8.3.
📌Choices field
9.
Ansible 4 Porting Guide - v4.10.0
9.1.
Major Changes
9.1.1.
containers.podman
9.2.
Deprecated Features🚫
9.2.1.
cisco.nxos
9.2.2.
junipernetworks.junos
10.
Ansible 4 Porting Guide - v4.9.0
10.1.
Issues
10.1.1.
purestorage.flashblade
10.2.
Major Changes
10.2.1.
fortinet.fortios
11.
Ansible 4 Porting Guide - v4.8.0
11.1.
Breaking Changes
11.1.1.
community.zabbix
11.2.
Deprecated Features🚫
11.2.1.
community.azure
11.2.2.
community.hashi_vault
12.
Ansible 4 Porting Guide - v4.7.0
12.1.
Major Changes✅
12.1.1.
openvswitch.openvswitch
12.2.
Deprecated Features🚫
12.2.1.
cisco.ios
12.2.2.
cisco.nxos
12.2.3.
community.vmware
12.2.4.
junipernetworks.junos
13.
Ansible 4 Porting Guide - v4.6.0
13.1.
Major Changes✅
13.1.1.
gluster.gluster
13.1.2.
containers.podman
13.2.
Deprecated Features🚫
13.2.1.
community.grafana
14.
Ansible 4 Porting Guide - v4.5.0
14.1.
Major Changes✅
14.1.1.
ovirt.ovirt
14.1.2.
hetzner.hcloud
14.2.
Deprecated Features🚫
14.2.1.
cisco.ios
14.2.2.
ansible.netcommon
14.2.3.
junipernetworks.junos
15.
Ansible 4 Porting Guide - v4.4.0
15.1.
Issues
15.1.1.
dellemc.openmanage
15.2.
Deprecated Features🚫
15.2.1.
cisco.nxos
15.2.2.
cisco.iosxr
15.2.3.
vyos.vyos
15.2.4.
junipernetworks.junos
15.2.5.
community.docker
16.
Ansible 4 Porting Guide - v4.3.0
16.1.
Major Changes✅
16.1.1.
netapp.cloudmanager
16.2.
Deprecated Features🚫
16.2.1.
community.hashi_vault
17.
Ansible 4 Porting Guide - v4.2.0
17.1.
Issues
17.1.1.
dellemc.openmanage
17.2.
Major Changes✅
17.2.1.
fortinet.fortios
17.2.2.
community.vmware
17.3.
Deprecated Features🚫
17.3.1.
ansible.windows
17.3.2.
community.general
17.3.3.
community.hashi_vault
18.
Ansible 4 Porting Guide - v4.1.0
18.1.
Issues
18.1.1.
dellemc.openmanage
18.2.
Major Changes✅
18.2.1.
fortinet.fortios
18.2.2.
cloudscale_ch.cloud
18.2.3.
community.postgresql
18.2.4.
dellemc.openmanage
18.2.5.
netbox.netbox
18.3.
Removed Features⭕
18.3.1.
ansible.windows
19.
Deprecated Features🚫
19.1.
ansible.windows
19.2.
community.docker
19.3.
inspur.sm
20.
Ansible 4 Porting Guide - v4.0.0
20.1.
Issues
20.1.1.
Ansible-core
20.1.2.
fortinet.fortios
20.1.3.
dellemc.openmanage
21.
Breaking Changes🎯
21.1.
Ansible-core
21.2.
community.docker
21.3.
ansible.netcommon
21.4.
fortinet.fortios
21.5.
theforeman.foreman
21.6.
servicenow.servicenow
21.7.
community.general
22.
Major Changes
22.1.
Ansible-core
22.2.
ansible.netcommon
22.3.
cisco.iosxr
22.4.
community.grafana
22.5.
community.mysql
22.6.
netapp.ontap
22.7.
fortinet.fortios
22.8.
vyos.vyos
22.9.
servicenow.servicenow
23.
Removed Features
23.1.
Ansible-core
23.2.
community.general
23.3.
community.network
23.4.
fortinet.fortios
24.
Deprecated Features🚫
24.1.
Ansible-core
24.2.
ansible.netcommon
24.3.
cloudscale_ch.cloud
24.4.
cisco.nxos
24.5.
community.crypto
24.6.
community.general
24.7.
f5networks.f5_modules
25.
Frequently Asked Questions
25.1.
Is Ansible open-source?
25.2.
On what language is Ansible built?
25.3.
What is the advantage of using Ansible?
25.4.
How does Ansible declare the configuration?
25.5.
Why do we use the Ansible command module?
26.
Conclusion
Last Updated: Mar 27, 2024

Ansible 4 Porting Guide

Author Akriti Bhan
1 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction🎯

Ansible is a well-known term these days in the technical domain.

about blog

In this blog, we will primarily discuss the Ansible 4 porting guide. We will start with discussing Ansible and related concepts and then finally proceed to learn about the Ansible 4 porting guide. Let us dive deep into the topic now.😎

Ansible💻

ansible

Before proceeding to the Ansible 4 porting guide, let us first discuss Ansible. Ansible is a simple IT automation tool. It automates provisioning, application deployment, configuration management, and orchestration. It is an agentless tool by Red Hat. It works on nearly all operating systems like windows, linux, and macOS. Now that we have a basic idea about Ansible let's discuss the Ansible 4 porting guide.

Playbook⭕

The playbook in Ansible refers to a list containing tasks used to execute against hosts automatically. The setting jinja2_native does not affect the template module used to return strings. The jinja2_native, which is off by default, is now used for this purpose.

Command Line

The ansible-galaxy login command is no longer in use. The reason for this is its deprecation of the GitHub API. If you want to publish roles to Galaxy using the ansible-galaxy command, you simply have to pass a GalaxyAPI token to the CLI(Command Line Interface) with the help of a token file.

Deprecated📌

The ansible.module_utils.basic._CHECK_ARGUMENT_TYPES_DISPATCHER is now deprecated. Now, ansible.module_utils.common.parameters.DEFAULT_TYPE_VALIDATORS has taken its place.

Breaking Changes

Let us now look at some of the changes in the AnsibleModule. The list below shows the modules that have been removed now.

  • _check_argument_types()
  • _check_arguments()
  • _check_argument_values()
  • _check_required_if()
  • _check_required_by()
  • _check_type_bool()
  • _check_type_bits()
  • _check_type_int()
  • _check_type_bytes()
  • _check_type_list()
  • _check_type_float()
     

The list of functions below, are the ones that are now private in the ansible.module_utils.common.parameters.

  • handle_aliases
  • list_deprecationsl
  • list_no_log_values

Some Important Points⭕

Moving ahead with the Ansible 4 porting guide, let us look at some crucial points.

important points

⭕You have to use the resolvelib in the ansible-galaxy command to resolve dependencies.

⭕If you want to upgrade ansible which is less than 2.10 or is ansible-base, you must first uninstall them using pip uninstall ansible or pip uninstall ansible-base and then install ansible-core.

⭕The choices field is now validated in the configuration system.

⭕In the apt_key module, you cannot use the file, data, URL, and keyserver together now.

⭕The tasks that are user-defined are now supported in the meta module.

⭕The type of the filter parameter is changed to list from string in the setup module.

Plugins🎯

plugins

📌Callback plugins

The execution of the meta task is sent to v2_playbook_on_task_start. You cannot send implicit meta tasks by default.

📌Inventory plugins

To remove any particular keys make use of delete() in the inventory pluginsWhen the clear_cache() method is called, facts are also deleted from the cache.

📌Choices field

As we have already mentioned that now the choices field is also validated, hence plugins that did not use proper choices now result in an error.

Ansible 4 Porting Guide - v4.10.0

Major Changes

containers.podman

✅Add driver opts support.

✅Add secrets driver.

✅Add podman_tag module.

Deprecated Features🚫

cisco.nxos

🚫Deprecated nxos_snmp_traps module.

🚫Deprecated nxos_snmp_user module.

🚫Deprecated nxos_snmp_host module.

🚫Deprecated nxos_snmp_location module.

🚫Deprecated nxos_snmp_community module.

🚫Deprecated nxos_snmp_contact nodule.

junipernetworks.junos

The router_id options are now deprecated from junos_ospf_interfacesjunos_ospfv2, and junos_ospvf3 modules.

Ansible 4 Porting Guide - v4.9.0

Issues

purestorage.flashblade

The field mac_address is not populated in the response in the purefb_lag.

Major Changes

fortinet.fortios

📌Selectors feature support in fortios_log_fact and fortios_monitor_fact.

📌FortiOS 7.0.1 support.

📌Delete or add member support on an object having members.

📌 Real-world use cases addition in some configuration modules.

Ansible 4 Porting Guide - v4.8.0

Breaking Changes

community.zabbix

Ansible 2.10 is the minimum requirement for support for all roles now.

Deprecated Features🚫

community.azure

🚫community.azure.azure_rm_virtualmachine_scaleset and community.azure.azure_rm_virtualmachinescaleset are now deprecated. You are supposed to use the azure.azcollection.azure_rm_virtualmachinescaleset now.

🚫All the modules in the community.azure.azure_rm_<resource>_facts are now deprecated.

🚫All the modules in the community.azure.azure_rm_<resource>_info are now deprecated.

🚫community.azure.azure_rm_managed_disk and community.azure.azure_rm_manageddisk are now deprecated.

🚫community.azure.azure_rm_virtualmachine_extension and community.azure.azure_rm_virtualmachineextension are now deprecated.

community.hashi_vault

The lookup_hashi_vault in the ansible.cfg is now deprecated. Now you can use the hashi_vault_collection.

Ansible 4 Porting Guide - v4.7.0

Major Changes✅

openvswitch.openvswitch

Version 2.0.1 is released.

Deprecated Features🚫

cisco.ios

The ios_ntp modules are deprecated.

cisco.nxos

The nxos_ntp_auth, nxos_ntp and nxos_ntp_options modules are now deprecated.

community.vmware

The VNC server is removed.

junipernetworks.junos

The router_id from ospfv2 module is deprecated.

Ansible 4 Porting Guide - v4.6.0

Major Changes✅

gluster.gluster

Before starting the gluster volume, do not forget to enable the client.ssl and server.ssl.

containers.podman

⭕Systemd generation for pods is to be added.

⭕Systemd service files are to be generated for containers.

Deprecated Features🚫

community.grafana

An API key with a destroyed version is not accepted.

Ansible 4 Porting Guide - v4.5.0

Major Changes✅

ovirt.ovirt

The role for removing stale LUN is to be added.

hetzner.hcloud

Has introduced placement groups.

Deprecated Features🚫

cisco.ios

🚫The ios_bgp is deprecated.

🚫The testing with the provider for ansible-test integration jobs is to be removed.

ansible.netcommon

You can now set the value of the paramiko_ssh setting explicitly.

junipernetworks.junos

The router_id from the ospfv3 module is deprecated.

Ansible 4 Porting Guide - v4.4.0

Issues

dellemc.openmanage

The idrac_user module may give an error due to some pending attributes. In this case, you are advised to run the task again.

Deprecated Features🚫

cisco.nxos

The module nxos_logging has been deprecated.

cisco.iosxr

The module iosxr_logging has been replaced by the iosxr_logging_global resource module.

vyos.vyos

The module vyos_logging has been replaced by the vyos_logging_global resource module.

junipernetworks.junos

The module junos_logging has been replaced by the junos_logging_global resource module.

community.docker

The default value of command_handling, compatibility is now replaced with correct.

Ansible 4 Porting Guide - v4.3.0

Major Changes✅

netapp.cloudmanager

The stage environment is to be added to all the modules in the cloudmanager.

Deprecated Features🚫

community.hashi_vault

The Python 3.5 support will not be available in the 2.0.0 version of community.hashi_vault.

Ansible 4 Porting Guide - v4.2.0

Issues

dellemc.openmanage

📍The idrac_user module may result in an error. In this case, re-run the task.

📍You cannot create an uplink with the same name in the ome_smart_fabric_uplink module.

Major Changes✅

fortinet.fortios

  • Fortios 7.0 support.
  • Log APIs support.
  • A module fortios_monitor_fact is added.

community.vmware

A new module is added in vmware_object_custom_attributes_info.

Deprecated Features🚫

📌The community.kubernetes collection is now called the kubernetes.core.

ansible.windows

🚫The filtered_reason return value is replaced by filtered_reasons.

🚫The use_scheduled_task is now deprecated.

🚫The whitelist and blacklist options are now deprecated. These are now replaced by accept_list and reject_list.

community.general

🚫The availability_zone and instance_names are deprecated.

🚫The function's parameter in serverless is deprecated.

community.hashi_vault

It no longer supports Python 2 in the 2.0.0 version of the community.hashi_vault

Ansible 4 Porting Guide - v4.1.0

Issues

dellemc.openmanage

The idrac_user may give an error. In this case, re-run the task and wait.

Major Changes✅

fortinet.fortios

  • The firewall_central_snat_map has support for moving policy.
  • The fortios_configuration_fact needs improvement.
  • The check_mode has support for all configuration API-based modules.

cloudscale_ch.cloud

The custom_image module is to be added.

community.postgresql

The value of as_single_query is now yes in postgresql_query.

dellemc.openmanage

The check mode is now supported in the ome_firmware_baseline module and in the ome_firmware_catalog module.

netbox.netbox

The python package packages are now mandatory.

Removed Features⭕

ansible.windows

The shutdown_timeout and shutdown_timeout_sec have now been removed from the win_reboot.

Deprecated Features🚫

ansible.windows

The ignore_errors: True is now deprecated. Instead use the ignore_unreachable: True feature. 

community.docker

All the modules and plugins of Docker except the docker_swarm, and docker_compose are deprecated.

community.general

🚫The copy of ipaddress which is vendored is deprecated.

🚫The vault scripts will be removed from the community.general.

🚫In linode, the parameter backupsenabled is deprecated.

inspur.sm

Below is a list of all the features deprecated.

  • add_ad_group 
  • add_ldap_group
  • add_user 
  • add_user_group 
  • del_ad_group 
  • del_ldap_group
  • del_user
  • del_user_group
  • edit_ad_group 
  • edit_ldap_group
  • edit_user
  • edit_user_group

Ansible 4 Porting Guide - v4.0.0

Issues

Ansible-core

In the ansible-test, the pylint does not detect the ‘bad’ variables now.

fortinet.fortios

The monitor API modules do not have a version.

dellemc.openmanage

  • The idrac-user may result in an error.
  • You cannot create uplinks of the same name in the ome_smart_fabric_uplink module.

Breaking Changes🎯

Ansible-core

📌The tags for user-defined tasks are now supported in the meta module.

📌Even if –force is present you can still install the Made SCM collections.

📌The ansible-galaxy login command is no longer accepted.

community.docker

In the docker_swarm module, when you specify the join_token parameter, VALUE_SPECIFIED_IN_NO_LOG_PARAMETER will replace the returned join token.

ansible.netcommon

The ipaddress that is vendored is no longer available.

fortinet.fortios

  • The FOS module issues a request with Ansible in the generic FortiOS module.
  • The fortios will have FOS platforms.

theforeman.foreman

The variables in foreman now have foreman_ in beginning.

servicenow.servicenow

The auth field can do anything but not the basic authentication.

community.general

  • The python-oca is not used now in one-image. It has been replaced with pyone.
  • placeholder string is now present in the returned value from the frontend_cookie_secret

Major Changes

Ansible-core

✅Now you can use the ansible-galaxy collections –upgrade option to upgrade Ansible collections from Galaxy.

✅A PyPI proxy container is now used by the test containers, centos6, and default.

✅If you want to install the Ansible collections from local folders, you can do it.

✅The ArgumentSpecValidator should be used for private methods in the modules.

✅The resolvelib >=0.5.3  and < 0.6.0 is now a dependency.

ansible.netcommon

The netconf_config should not have any deprecated connection arguments.

cisco.iosxr

The ansible.netcommon does not have the ipaddress now.

community.grafana

The skip_version_check option is now there.

community.mysql

  • The Is_Slave and Is_Master are now replaced by Is_Replica and Is_Primary.
  • The support for REQUIRESSL will no longer be there.
  • The options getslave, startslave, stopslave and resetslave are all deprecated now.
  • The slave word is no longer used, it is replaced by replica.

netapp.ontap

The REST support is added to the module.

fortinet.fortios

The modules mentioned below are added.

  • fortios_configuration_fact
  • fortios_json_generic
  • fortios_monitor
  • fortios_monitor_fact

vyos.vyos

The ansible.netcommon no longer contains the ipaddress.

servicenow.servicenow

  • It now supports the bearer tokens for the purpose of authentication.
  • The OpenID Connect authentication protocol is now supported.

Removed Features

Ansible-core

The ansible.constants.getconfig() is removed.

The ansible.constants.BECOME_METHODS is removed.

The ansible.constants.mk_boolean() is removed.

The SharedPluginLoaderObj class is removed.

community.general

The idrac_firmware, ome_device_info, and idrac_server_config_profile modules are now a part of the dellemc.openmanage.

The ali_instance_facts is removed.

The gluster_volume module is removed.

The gluster_peer module is removed.

The helm module is removed.

The gluster_heal_info module is removed.

The ovirt_vm_facts module is removed.

The ovirt_template_facts module is removed.

The ovirt_tag_facts module is removed.

** There are more modules that are removed.

community.network

  • The parameters rate_limit, forward_enp_slot have been removed.
  • The community.network.sros netconf plugin is no longer available.

fortinet.fortios

The list of modules deprecated are listed below.

  • fortios_facts
  • fortios_registration_forticare
  • fortios_registration_vdom
  • fortios_system_config_backup_restore
  • fortios_system_vmlicense

Deprecated Features🚫

Ansible-core

In the apt_key, the key parameter has been deprecated.

Version 0.4.0 should be the minimum version of pypsrp.

ansible.netcommon

The cli_parse module is deprecated.

cloudscale_ch.cloud

The server_uuid and server_uuids is removed in the volume module.

cisco.nxos

The nxos_bgp_af and nxos_bgp_neighbor are deprecated.

community.crypto

  • The module utils acme is deprecated.
  • The retrieve_orders=url_list, orders are no longer available.

community.general

  • In runit, the parameter dist is deprecated.
  • The no-recommends and update-cache in the urpmi are deprecated.
  • The update-brew in homebrew_cask is deprecated.
  • In puppet, the show_diff is deprecated.

** There are other parameters also that are deprecated.

f5networks.f5_modules

In this, the support for versions of Python before 3.5 is deprecated.

 

We hope you are now familiar with the Ansible 4 porting guide concept.✅

Frequently Asked Questions

Is Ansible open-source?

Yes, Ansible is open-source software.

On what language is Ansible built?

Ansible is written in python. However, you can use it without the knowledge of python.

What is the advantage of using Ansible?

Ansible makes DevOps a lot easier. You do not have to perform a particular task manually every time instead you can just automate it.

How does Ansible declare the configuration?

Ansible uses the YAML( Yet Another Markup Language) to declare the state of devices and the configuration.

Why do we use the Ansible command module?

We use the Ansible command module to run the commands or scripts in the target machine.

Conclusion

In this blog, we discussed about the Ansible 4 porting guide. We started with a discussion on Ansible. We also discussed about the playbook, command line and deprecated features. We then finally explored the Ansible 4 porting guide in detail.

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