Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1779

Run Integration test with ansible-navigator using cloud.azure_ops EE image and inventory file

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • azure, content
    • None

      vi definition-file-ee.yaml:

       
      ---
      version: 3
      
      
      
      images:
        base_image:
          name: 10.0.205.19/ee-minimal-rhel8:latest
      dependencies:
        galaxy: requirements.yml
      additional_build_steps:
        prepend_base:
          - RUN pip3 install --upgrade pip setuptools wheel ansible-core ansible-navigator
          - ENV ANSIBLE_ROLES_PATH=/usr/share/ansible/collections/redhat-cop/cloud/azure_ops/tests/integration/targets
          - ENV AZURE_SUBSCRIPTION_ID=<SubscriptionID>
          - ENV AZURE_CLIENT_ID=<ApplicationId>
          - ENV AZURE_SECRET=<Password>
          - ENV AZURE_TENANT=<TenantID>
      options:
        package_manager_path: /usr/bin/microdnf
      

       

       
       vi requirements.yml:

       
      ---
      collections:
        - name: azure.azcollection
        - name: git+https://github.com/redhat-cop/cloud.azure_ops.git
          type: git
          version: main
      

       

       
       
      vi inventory:
       
      add your resource group

      [test_env]
      localhost
      
      
      
      [test_env:vars]
      ansible_connection=local
      ansible_become=False
      ansible_become_pass=
      collection_name=azure_ops
      collection_namespace=cloud
      target_name="test_azure_manage_resource_group"
      resource_group=<add your resource group>
      resource_prefix="test"
      

       

      Build the image:

      ansible-builder build --no-cache --tag azure-ops-ee:latest -f definition-file-ee.yaml --container-runtime=podman -v 3

       

      Clone the AAP repo:

      GitHub repo to run integration test targets with ansible-navigator or AAP controller: https://github.com/ansible/aapqa-test-content

       

      Command to run integration target tests locally in the execution environment with ansible-navigator:

      ansible-navigator run --eei localhost/azure-ops-ee:latest ./aapqa-test-content/run_integration_tests.yaml -i inventory --mode=stdout --pp never -vvv

              prabinov Polina Rabinovich
              prabinov Polina Rabinovich
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: