module

Krikri::ActionGroups

module_defaults: accepts an ACTION GROUP key (group/aws, group/consul) standing for every module in that group, instead of naming each one. Real Ansible learns group membership from each installed collection's meta/runtime.yml:

action_groups:
  consul:
    - consul_kv
    - consul_token
  proxmox:
    - metadata:
        extend_group:
          - community.proxmox.proxmox

This reads the same files rather than carrying a hardcoded table, so a group/ key resolves to whatever the collections on this machine actually define - and keeps resolving correctly as they change.

Constants

BUILTIN_GROUPS = {"aws" => ["amazon.aws.aws", "community.aws.aws"], "acme" => ["community.crypto.acme"], "azure" => ["azure.azcollection.azure"], "cpm" => ["wti.remote.cpm"], "docker" => ["community.general.docker", "community.docker.docker"], "gcp" => ["google.cloud.gcp"], "k8s" => ["community.kubernetes.k8s", "community.general.k8s", "community.kubevirt.k8s", "community.okd.k8s", "kubernetes.core.k8s"], "os" => ["openstack.cloud.os"], "ovirt" => ["ovirt.ovirt.ovirt", "community.general.ovirt"], "vmware" => ["community.vmware.vmware"], "testgroup" => ["testns.testcoll.testgroup", "testns.testcoll.anothergroup", "testns.boguscoll.testgroup"], "testlegacy" => [] of String}

ansible-core's own action groups, mirrored from its config/ansible_builtin_runtime.yml. Each maps to the collection groups it extends; testgroup/testlegacy are ansible-core's own test fixtures, included so the set matches exactly.

Class methods

collection_paths

Where collections live, in real Ansible's own search order.

Source
groups
Source
modules_for(group_key : String) : Array(String) | Nil

The modules named by a group/<name> key, or nil when nothing defines it - the caller turns that into real Ansible's own error. A bare name is qualified into ansible.builtin, exactly as real Ansible does.

Source
qualified_name(group_key : String) : String

The name real Ansible reports in its error for an unresolvable group, so the message can match.

Source
reset!

Test seam: forget what was scanned, so a spec can point ANSIBLE_COLLECTIONS_PATH at a fixture and rescan.

Source