Skip to content

Regarding Testing of Ansible Playbook for Roles and Tasks #312

@mavsravikiran

Description

@mavsravikiran

Description

  • I am having a ansible automation for installation of softwares on windows and WSL(Linux)

  • We are using two third party package managers for installations

    1. Chocolatey (https://chocolatey.org/)-- which is for windows
    2. ASDF (https://asdf-vm.com/) , Apt (https://manpages.ubuntu.com/manpages/jammy/man8/apt.8.html) -- which is for WSL(Linux)
  • We are providing installations like Node, Python, Java, AWS (CLI and CDk), terraform, maven, notepad++, ruby, microsoft windows terminal, curl, putty, beyond compare, WINSCP, IDES like VSCode and Intellij

  • We have the code path as below structure, consider example for AWS

    1. windows.yml-- which will have the windows script
    2. wsl.yml-- which will have the wsl script
    3. main.yml-- this is the file at present at individual role and we will call those windows.yml and wsl.yml here
  • Finally we have a main.yml at root of the application where we will have the roles an tags place

Query / Ask

  • As i had given my sample block of code for java and python, similar blocks are there for node, aws roles etc
  • My Ask is how can we do the Integration testing, Sanity testing, Unit Testing for those roles, Need some information on this
  • If any testing tool is there how can i integrate that with my ansible playbook locally with VSCode, Need some information on this

Need some Guidance/ Help/ Information How can i perform the Testing with these playbooks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions