Skip to content

Comments

added aliases and completion for ansible, ansible-dev, molecule; removed plugin ansible#734

Draft
PascalKont wants to merge 9 commits intoohmybash:masterfrom
PascalKont:aliases/ansible
Draft

added aliases and completion for ansible, ansible-dev, molecule; removed plugin ansible#734
PascalKont wants to merge 9 commits intoohmybash:masterfrom
PascalKont:aliases/ansible

Conversation

@PascalKont
Copy link

I revamed the ansible plugin into an alias file, since it mainly consisted of aliases anyway.
Also added ansible-dev aliases, containing aliases for tools used during ansible content development.
This also includes the ansible testing utility molecule, for which i created a separate alias file.

@qodo-free-for-open-source-projects

Review Summary by Qodo

Refactor ansible plugin into modular alias files

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Converted ansible plugin into dedicated alias files
• Created ansible.aliases.bash with core ansible commands
• Created ansible-dev.aliases.bash for development tools
• Created molecule.aliases.bash for molecule testing utility
• Removed legacy ansible plugin and documentation
Diagram
flowchart LR
  oldPlugin["ansible plugin<br/>functions + aliases"]
  ansibleAliases["ansible.aliases.bash<br/>core commands"]
  devAliases["ansible-dev.aliases.bash<br/>dev tools"]
  moleculeAliases["molecule.aliases.bash<br/>molecule commands"]
  oldPlugin -- "split into" --> ansibleAliases
  oldPlugin -- "split into" --> devAliases
  oldPlugin -- "split into" --> moleculeAliases
Loading

Grey Divider

File Changes

1. aliases/ansible.aliases.bash ✨ Enhancement +18/-0

Core ansible command aliases

• New file containing core ansible command aliases
• Includes aliases for ansible, ansible-config, ansible-console, ansible-doc, ansible-galaxy,
 ansible-inventory, ansible-playbook, ansible-pull, ansible-test, and ansible-vault
• Maintains backwards compatibility with previous plugin aliases
• References ansible-core documentation

aliases/ansible.aliases.bash


2. aliases/ansible-dev.aliases.bash ✨ Enhancement +23/-0

Ansible development tools aliases

• New file for ansible development tools aliases
• Includes aliases for ansible-builder, ansible-creator, ansible-lint, ansible-navigator,
 ansible-runner, and ansible-sign
• Contains backwards compatible ansible-role-init alias
• References ansible development tools documentation

aliases/ansible-dev.aliases.bash


3. aliases/molecule.aliases.bash ✨ Enhancement +23/-0

Molecule testing utility aliases

• New file dedicated to molecule testing utility aliases
• Provides 18 aliases covering molecule commands like check, cleanup, converge, create, destroy,
 test, verify
• Includes help and matrix command aliases
• References molecule documentation

aliases/molecule.aliases.bash


View more (2)
4. plugins/ansible/ansible.plugin.sh Miscellaneous +0/-29

Removed legacy ansible plugin

• Deleted legacy ansible plugin file
• Contained functions (ansible-version, ansible-role-init) and basic aliases
• Functionality migrated to new dedicated alias files

plugins/ansible/ansible.plugin.sh


5. plugins/ansible/README.md 📝 Documentation +0/-27

Removed ansible plugin documentation

• Deleted plugin documentation file
• Contained usage instructions and alias reference table
• Documentation no longer needed as plugin converted to alias files

plugins/ansible/README.md


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link

qodo-free-for-open-source-projects bot commented Feb 17, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (1) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Docs still advertise ansible plugin 🐞 Bug ✓ Correctness
Description
The repo still documents an ansible *plugin*, but this PR moves ansible support into *alias
modules*. Users following the plugin docs and enabling plugins+=(ansible) will hit the module
loader error path (plugin module not found) and get none of the new aliases.
Code

aliases/ansible.aliases.bash[R3-5]

+# kept for backwards compatbility, these used to be functions in the previous oh-my-bash ansible plugin
+alias aver='ansible --version; ansible-community --version'
+#alias arinit='ansible-role-init'   # this alias can now be found in the ansible-dev aliases
Evidence
The plugins documentation claims ansible is a plugin, while the module loader will only load
plugins from plugins//.plugin.{bash,sh} and prints an error if the module is missing. Meanwhile,
this PR introduces aliases/ansible.aliases.bash and explicitly notes the prior ansible plugin,
indicating users should switch from plugin configuration to alias configuration.

plugins/README.md[26-30]
oh-my-bash.sh[51-88]
aliases/ansible.aliases.bash[1-5]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`plugins/README.md` still documents an `ansible` plugin even though ansible support is now implemented as alias modules. This misleads users into enabling `plugins+=(ansible)`, which the module loader will fail to find.
### Issue Context
Oh-My-Bash loads plugins from `plugins/&amp;lt;name&amp;gt;/&amp;lt;name&amp;gt;.plugin.{bash,sh}` and prints `module &amp;#x27;plugin:&amp;lt;name&amp;gt;&amp;#x27; not found` when absent. This PR introduces `aliases/ansible.aliases.bash` and notes the previous ansible plugin.
### Fix Focus Areas
- plugins/README.md[26-30]
- aliases/ansible.aliases.bash[1-5]
- oh-my-bash.sh[66-88]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Single-letter alias a 📘 Rule violation ✓ Correctness
Description
The new alias a is a generic single-letter identifier that does not clearly express intent and can
hurt readability/maintainability. This conflicts with the requirement for meaningful,
self-documenting naming.
Code

aliases/ansible.aliases.bash[8]

+alias a='ansible '
Evidence
PR Compliance ID 2 requires identifiers to clearly express purpose and discourages
generic/single-letter names; the PR introduces the single-letter alias a for ansible.

Rule 2: Generic: Meaningful Naming and Self-Documenting Code
aliases/ansible.aliases.bash[8-8]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new single-letter alias `a` was added for `ansible`. This name is generic and not self-documenting, which can reduce readability.
## Issue Context
This repository adds shell aliases; even in alias files, overly generic identifiers can be confusing or conflict with other conventions.
## Fix Focus Areas
- aliases/ansible.aliases.bash[8-8]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. New alias modules not listed 🐞 Bug ✓ Correctness
Description
The new alias modules ansible, ansible-dev, and molecule are not included in
aliases/README.md’s module list, reducing discoverability and making it harder for users to
configure aliases+=(...) correctly.
Code

aliases/molecule.aliases.bash[R1-5]

+#! bash oh-my-bash.module
+
+# molecule: https://docs.ansible.com/projects/molecule/
+alias mol='molecule '
+alias mhlp='molecule --help '
Evidence
aliases/README.md is the index of alias modules but does not mention the newly added modules. The
new alias module files exist under aliases/*.aliases.bash, so the index is now incomplete.

aliases/README.md[13-25]
aliases/ansible.aliases.bash[1-18]
aliases/ansible-dev.aliases.bash[1-23]
aliases/molecule.aliases.bash[1-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The aliases index (`aliases/README.md`) doesn’t list the newly added alias modules, so users won’t discover them when browsing available modules.
### Issue Context
Users typically enable alias modules via `aliases=(... &amp;lt;name&amp;gt;)` and the README serves as the module catalog.
### Fix Focus Areas
- aliases/README.md[13-25]
- aliases/ansible.aliases.bash[1-18]
- aliases/ansible-dev.aliases.bash[1-23]
- aliases/molecule.aliases.bash[1-23]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@PascalKont
Copy link
Author

About the single char alias a='ansible ', i don't know if it makes sense to change this? This may break usability for users who are already familiar with the old plugin. But on the other hand, they could add it for themselves.

@PascalKont
Copy link
Author

PascalKont commented Feb 17, 2026

I just realized the original plugin came 1:1 from the upstream oh-my-zsh project.
I created PRs there:
ohmyzsh/ohmyzsh#13581
ohmyzsh/ohmyzsh#13587

@PascalKont PascalKont marked this pull request as draft February 17, 2026 21:15
@PascalKont PascalKont changed the title added aliases ansible, ansible-dev, molecule, removed plugin ansible added aliases and completion for ansible, ansible-dev, molecule; removed plugin ansible Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant