Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shatakshiiii
Copy link
Contributor

@shatakshiiii shatakshiiii commented May 21, 2025

SUMMARY

JIRA: AAP-30868
Closes: #4009

This PR adds ansible-navigator provisioner alongside the existing ansible-playbook provisioner. Introduces a backend option in the molecule.yml file and modifies ansible-playbook class to handle the selection of the backend.

Details -

  • Updated the molecule.yml schema to include a backend config option under the provisioner section. This option allow users to specify either ansible-playbook or ansible-navigator as the backend.
  • Modified the bake method to construct the command based on the selected backend.

@shatakshiiii shatakshiiii requested a review from Qalthos May 21, 2025 13:54
@shatakshiiii shatakshiiii requested a review from Qalthos May 22, 2025 03:48
@shatakshiiii shatakshiiii marked this pull request as ready for review May 27, 2025 14:51
@shatakshiiii shatakshiiii requested a review from a team as a code owner May 27, 2025 14:51
Copy link
Contributor

@cidrblock cidrblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a quick test for navigator? It can use navigator's default EE, but we should make sure it works.

Can you also add some docs someplace explaining the param and that it gives the user the ability to test inside of an EE?

@cidrblock cidrblock requested a review from Copilot May 27, 2025 17:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the ansible-navigator provisioner alongside the existing ansible-playbook provisioner, allowing users to select the backend through a new backend option in molecule.yml. Key changes include:

  • Updating the molecule.yml schema and test fixtures to support a new "backend" configuration.
  • Extending ProvisionerData and the ansible backend property to include and manage the new backend option.
  • Modifying the bake method in ansible_playbook.py to construct commands based on the selected backend.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/fixtures/integration/test_command/molecule/kubevirt/molecule.yml Added backend config option comment to show valid options.
src/molecule/types.py Extended ProvisionerData to support a backend option.
src/molecule/provisioner/ansible_playbook.py Updated bake method to handle both ansible-playbook and ansible-navigator backends with error handling.
src/molecule/provisioner/ansible.py Added a new backend property to expose the provisioner’s backend value.
src/molecule/data/molecule.json Updated JSON schema to include the new backend property.
src/molecule/config.py Added a default key for backend in the provisioner configuration.

@cidrblock
Copy link
Contributor

(added copilot to see it's review)

@shatakshiiii shatakshiiii requested a review from cidrblock May 28, 2025 12:55
@shatakshiiii shatakshiiii requested review from Qalthos and cidrblock May 29, 2025 07:38
@shatakshiiii
Copy link
Contributor Author

@cidrblock @Qalthos, I have added an integration test for the case where backend is set to ansible-navigator.
Please give it a re-review :)

@shatakshiiii shatakshiiii requested a review from cidrblock May 29, 2025 13:32
@cidrblock cidrblock marked this pull request as draft May 29, 2025 15:09
@cidrblock
Copy link
Contributor

let's move the backend to

executor:
  backend:  {either ansible-playbook, ansible-navigator}

@cidrblock
Copy link
Contributor

cidrblock commented May 29, 2025

please mark this experimental somewhere

@Qalthos
Copy link
Collaborator

Qalthos commented May 29, 2025

let's move the backend to

executor:
  backend:  {either ansible-playbook, ansible-navigator}

This would be a new key under ConfigData (https://github.com/ansible/molecule/pull/4444/files#diff-0e1bbb81ccf5b80466feff69e7a3583e850ce51db716f997cf0612a7667d2ad8L213) adding a new ExecutorData TypedDict into types

@cidrblock cidrblock marked this pull request as ready for review May 29, 2025 15:26
shatakshiiii added a commit that referenced this pull request Jun 11, 2025
### SUMMARY

This PR adds a "backend" option in the molecule.yml file, inside a new
root level key "executor".
Relevant tests and docs are added in the PR.

Follow-up work from #4444
JIRA: [AAP-46691](https://issues.redhat.com/browse/AAP-46691)

**Example molecule.yml with ansible-navigator set as playbook executor
->**

```
---
executor:
  backend: ansible-navigator
platforms:
  - name: localhost
provisioner:
  name: ansible
```
@shatakshiiii
Copy link
Contributor Author

All the changes are done in PR: #4457

@github-project-automation github-project-automation bot moved this from In Progress to Done in 🧰 devtools project board Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants