1
0
Fork 0
dotfiles/common/.config/aichat/functions/agents/ansible-coder/tools.sh
2025-02-26 18:35:32 +01:00

23 lines
641 B
Bash
Executable file

#!/usr/bin/env bash
set -e
# @env LLM_OUTPUT=/dev/stdout The output path
# @cmd List available ansible modules, optionally filtering by collection
# @option --filter A collection name in form of namespace.collection
ansible_list_plugins() {
ansible-doc --list "$argc_filter" >> "$LLM_OUTPUT"
}
# @cmd Retrieve the documentation for an ansible plugin
# @option --plugin! The name of a plugin in the form of namespace.collection.plugin
ansible_get_plugin_docs() {
ansible-doc "$argc_plugin" >> "$LLM_OUTPUT"
}
# @cmd Run the ansible linter
ansible_lint() {
ansible-lint >> "$LLM_OUTPUT"
}
eval "$(argc --argc-eval "$0" "$@")"