azure icon indicating copy to clipboard operation
azure copied to clipboard

Azure Managed Application Module

Open scottharwell opened this issue 3 years ago • 0 comments

SUMMARY

Support for deployment and management of Azure managed applications through an Ansible module with similar capabilities to the Azure CLI to allow for Ansible-native automated deployment of Azure managed applications.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • azure_rm_managedapplication
  • azure_rm_managedapplication_info
ADDITIONAL INFORMATION
Story

As an Azure and Ansible customer I can use Ansible playbooks to support the deployment and management of my Managed Applications so that I can design automation that doesn't require an experience where I have to build non-declarative playbooks that leverage work-arounds using the Azure CLI and maintain custom Execution Environments that provide the Azure CLI or REST API support that do operate with Managed Applications.

Details

The Red Hat Ansible Platform on Microsoft Azure team, as well as Azure/Ansible customers, must currently design and develop non-idempotent work arounds to build Ansible Playbooks that automate the lifecycle of the managed application. As mentioned in the user story, this typically involves the creation of a custom execution environment that packages the external dependencies (Azure CLI, SDKs, etc.) along with calls to scripts or the CLI to perform the actual work. This module would make managed application management native to Ansible and allow for proper declaration of the state of the infrastructure directly in the Ansible playbook.

- name: Create Red Hat Ansible Automation Platform on Microsoft Azure managed application
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Create Managed Application
      azure_rm_managedapplication:
        name: "{{ app_name }}"
        subscription: "{{ subscription }}"
        resource_group: "{{ resource_group }}"
        managed_resource_group: "/subscriptions/{{ subscription }}/resourceGroups/{{ mrg_group_name }}"
        region: "{{ region }}"
        plan_name: "{{ plan_name }}"
        plan_version: "{{ plan_version }}"
        plan_product: "{{ plan_product }}"
        plan_publisher: "{{ plan_publisher }}"
        parameters: |
            {"adminPassword":{"value":"{{ admin_password }}"},"crossTenantRoleAssignment":{"value":true},"deployType":{"value":"prod"},"location":{"value":"{{ region }}"}}
        state: present
        tags:
          deployment: ansible

scottharwell avatar May 10 '22 12:05 scottharwell