Installing collections for SCT "manual" project

I have been trying to create a manual source control type project but need to install some collections along side it.

I have the mount created and is being mounted into my pods.
I created the sub project and i can see my playbooks.

I need to install some collections to support my plays. I’ve installed them manually under the collections\ansible_collections but my play isn’t seeing them:

.
├── ansible.cfg
├── collections
│ ├── ansible_collections
│ │ ├── awx
│ │ ├── awx.awx-24.6.1.info
│ │ ├── community
│ │ ├── community.general-13.4.0.info
│ │ ├── community.library_inventory_filtering_v1-1.1.5.info
│ │ ├── kubernetes
│ │ └── kubernetes.core-6.5.0.info
│ └── requirements.yml
├── playbooks
│ └── tester.yaml
├── roles
│ ├── debug_role
│ │ ├── defaults
│ │ ├── handlers
│ │ ├── meta
│ │ ├── README.md
│ │ ├── tasks
│ │ ├── tests
│ │ └── vars

Error seen:

ERROR! couldn’t resolve module/action ‘community.general.mail’. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in ‘/runner/project/roles/gather_facts/tasks/main.yml’: line 96, column 11, but may

be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    - name: Email error report - other # noqa: run-once\[task\]

      ^ here

Any suggestions would be greatly appreciated

I shouldn’t have given up so soon.

I needed to update my ansible.cfg

[defaults]

Keep any paths that there and append this path after a colon

roles_path = /runner/project/roles
collections_path = /runner/project/collections

Well done! Yeah that’s often the right place.

Don’t forget you can override that path with the environment variable ANSIBLE_COLLECTIONS_PATH at playbook runtime (must be exported to the shell, or added as container environment (such as “-e” for docker)

If you have your own custom module that doesn’t belong to a collections package, you can put it in the “library/“ path of either the playbook directory or the root of the repo (or wherever you mounted all this). Library modules don’t get an FQCN prefix, however. They’re just called by their name (“my_module:”).

Enjoy!