ansible share image

Red Hat Ansible Automation Platform operates as an agentless automation tool designed for installation on a single host known as the control node. From this node, Ansible Automation Platform effectively oversees a complete array of machines and other devices, referred to as managed nodes, through remote connections such as SSH, Powershell remoting, and various other transports. This is all accomplished through a straightforward command-line interface, eliminating the need for databases or daemons.

VMware vSphere 8 is an enterprise workload platform that offers the advantages of the cloud to on-premises workloads. It elevates performance through the use of DPU and GPU-based acceleration, streamlines operational efficiency with the VMware Cloud Console, seamlessly integrates with supplementary hybrid cloud services, and fosters innovation with its enterprise-ready integrated Kubernetes runtime, enabling the concurrent operation of containers and virtual machines.

Prerequisites

  1. Set up Ansible Automation Platform on your control machine by following the instructions provided in the installation guide.
  2. Install the necessary Python libraries listed in requirements.txt as follows:
    $ pip install -r requirements.txt
  1. Install the necessary Ansible Content Collections with the latest version specified in requirements.yml:
    $ ansible-galaxy install -r requirements.yml
  1. Access the local control machine by logging in as either the root user or a user listed in sudoers with NOPASSWD enabled for all commands.

Launch testing

  1. Clone the project from GitHub into your workspace on the control machine using Git.
  2. Configure the necessary parameters for testing in the file vars/test.yml.
  3. Update the test cases in the test case list file located at the following default paths:
    • Linux testing: linux/gosv_testcase_list.yml
    • Windows testing: windows/gosv_testcase_list.yml
  4. Initiate testing using the following commands from the same directory as main.yml:
    # For Linux testing:
      # you can use below command to use the default variables file "vars/test.yml",
      # and default test case list file "linux/gosv_testcase_list.yml"
      $ ansible-playbook main.yml
    
      # For Linux or Windows testing:
      # you can use below command to set the path of a customized variables file and
      # test case list file
      $ ansible-playbook main.yml -e "testing_vars_file=/path_to/test.yml testing_testcase_file=/path_to/gosv_testcase_list.yml"

A new log folder will be generated for the current test run, containing log files and files collected during test cases. For example, check the logs/test-vm/2021-07-06-09-27-51/ directory to locate the log files. The log files contain the following:

  • results.log contains testbed information, VM information, and test case results.
  • full_debug.log contains testing debug logs.
  • failed_tasks.log contains failed tasks logs.
  • known_issues.log lists known issues in the current test run.

Catalog

  • main.yml: Primary playbook for validating the guest operating system.
  • ansible.cfg: Customized Ansible configuration file for the user.
  • autoinstall: Directory containing configuration files for unattended installation of the guest operating system.
  • common: Directory for common tasks invoked in test cases.
  • docs: Directory for guide files and known issues.
  • env_setup: Directory for playbooks or tasks that prepare or clean up the testing environment.
  • linux: Directory for playbooks testing the Linux guest operating system.
  • windows: Directory for playbooks testing the Windows guest operating system.
  • plugin: Directory for plugin scripts.
  • tools: Directory for third-party tools used in test cases.
  • vars: Directory for variable files used in testing.
  • changelogs: Directory for the changelog of each release.

Supported testing scenarios

This project is designed to accommodate the following scenarios for end-to-end validation testing of guest operating systems:

  1. Deploy a virtual machine and install the guest operating system using an ISO image.
  2. Deploy a virtual machine from an OVA template.
  3. Utilize an existing virtual machine with an installed guest operating system, ensuring it meets these specified requirements:
    • Configure the VM with a single connected network adapter.
    • SSH and Python are installed and active.
    • Configure the vm_python variable in vars/test.yml with the correct Python path. Alternatively, users can set the PATH in /etc/environment within the guest operating system to incorporate the binary directory path to Python.
    • Enable and allow the root user to log in through SSH on Linux guest operating systems.
    • Prior to execution, run the ConfigureRemotingForAnsible.ps1 script in the Windows guest operating systems.

Compatible guest operating systems

Refer to the VMware Compatibility Guide for information on the current support status of guest operating systems on ESXi.

Docker images

Refer to the Guest OS validation test set for vSphere using Ansible page.

  • Latest (Release v3.0):
    • projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
  • Release v3.0:
    • projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:v3.0

Launch testing using Docker image:

  1. Run the following commands on your machine:
    $ docker pull projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
    $ docker run -it --privileged projects.registry.vmware.com/gos_cert/ansible-vsphere-gos-validation:latest
  1. Initiate testing within the container by following the instructions outlined on the GitHub testing steps page.