Ansible 2.6: Your Time Has Come!



  • Ansible-2.6

    Guess what!? Another release has come upon us! Your time has come to upgrade to Ansible 2.6-”Heartbreaker.” Utilize some great updates to automate to your heart’s desire, and avoid being heartbroken. See what I did there?

    Let’s dive right into some of the changes.

    Deprecation

    One little bit of house cleaning before getting into the rest of the fun. The deprecated task option always_run has been removed, please use check_mode: no instead.

    For any more information on behavioural changes from Ansible 2.5 to Ansible 2.6, please check out the Porting Guide.

    Memory Utilization Improvements

    In the development cycle of 2.6, we started to tackle a memory utilization problem that some of our users experienced in Dynamic Includes. In some cases, we have seen “roughly a drop of 50% memory consumption,” and in one scenario we had seen execution times of 21 seconds down to 8 seconds after the change was applied. Cool little bit, a bunch of these fixes were also back-ported to Ansible 2.5 as well as Ansible 2.4! In a future blog post, we plan to go into more detail of what was done to improve upon Dynamic Includes. Also, look forward to more features to be added to Includes and Imports in the future!

    Security Fixes

    For those not aware, a CVE was posted for Ansible; which was fixed in Ansible 2.6, as well as back-ported to 2.5 and 2.4. Some connection exceptions would cause no_log specified on a task to be ignored. If this happened, the task information, including any private information could have been displayed, and (if enabled) logged to a log file specified.

    Inventory Plugins

    A while back, I did a Feature Spotlight on our new Inventory Plugin system. In Ansible 2.6, we have provided more plugins to utilize for your environments. Here’s a list of what was provided:

    • foreman - Get inventory hosts from the foreman service.
    • generator - Uses Jinja2 to construct hosts and groups from patterns
    • gcp_compute - Google Cloud Compute Engine inventory source
    • nmap - Uses nmap to find hosts to target

    Cloud

    More cloud content you say?! Okay, we’ll give you some more cloud content! Here are some highlights of what was released this version. For the full list of content released, please see the Release Notes.

    Amazon

    • ec2_eip_facts - List EC2 EIP details
    • ec2_vpc_vpn_facts - Gather facts about VPN Connections in AWS.
    • elb_network_lb - Manage a Network Load Balancer
    • rds_instance_facts - obtain facts about one or more RDS instances
    • rds_snapshot_facts - obtain facts about one or more RDS snapshots

    Azure

    • azure_rm_aks - Manage a managed Azure Container Service (AKS) Instance.
    • azure_rm_aks_facts - Get Azure Kubernetes Service facts
    • azure_rm_resource - Create any Azure resource
    • azure_rm_resource_facts - Generic facts of Azure resources

    Google

    • gcp_compute_address - Creates a GCP Address
    • gcp_compute_instance - Creates a GCP Instance
    • gcp_compute_network - Creates a GCP Network
    • gcp_container_cluster - Creates a GCP Cluster
    • gcp_container_node_pool - Creates a GCP NodePool

    Network

    Connection Plugins

    • httpapi - New connection method that simplifies connections to platform-specific APIs such as Arista eAPI and Cisco NXAPI. This method replaces connection: local with connection: httpapi and then specifying the specific platform via the ansible_network_os variable.

    Modules

    • net_get - downloads a large config file to target network device with SCP/SFTP
    • net_put - copies a large config file to target network device with SCP/SFTP
    • netconf_get - fetches the configuration and state data from remote NETCONF enabled network device/host
    • netconf_rpc - executes generic NETCONF RPC commands that are defined by NETCONF standard as well as proprietary RPC-based NETCONF capabilities supported by the remote network device/host

    And we made a lot of updates to the Ansible Network Automation documentation.

    Windows

    We have released a slew of bug fixes, removed some deprecated feature, and finally added some new content for our lovers of the Microsoft Operating System family.

    New Content

    • win_domain_computer - Manage computers in Active Directory
    • win_hostname - Manages local Windows computer name
    • win_pester - Run Pester tests on Windows hosts
    • win_updates - Added the ability to run on a scheduled task for older hosts so async starts working again
    • winrm - Add better error handling when the kinit process fails

    Bug fixes

    • win_environment - Fix for issue where the environment value was deleted when a null value or empty string was set
    • win_file - fix issue where special chars like [ and ] were not being handled correctly
    • win_template - fix when specifying the dest option as a directory with and without the trailing slash
    • windows become - Show better error messages when the become process fails
    • winrm - allow ansible_user or ansible_winrm_user to override ansible_ssh_user when both are defined in an inventory
    • winrm connection plugin - Fix exception messages sometimes raising a traceback when the winrm connection plugin encounters an unrecoverable error

    Removed Deprecations

    Here are the previously deprecated iems removed this release. Once again, please view the Porting Guide for this release for all behavioural changes information.

    • win_chocolatey - removed deprecated upgrade option and choco_* output return values
    • win_feature - removed deprecated reboot option
    • win_iis_webapppool - removed the ability to supply attributes as a string in favour of a dictionary
    • win_package - removed deprecated name option
    • win_regedit - removed deprecated support for specifying HKCC as HCCC

    https://www.ansible.com/blog/your-time-has-come-ansible-2-6


Log in to reply
 

© Lightnetics 2024