How to install Community.General collection in AAP 2.5?

Folks, I’m having trouble to install the collection in AAP 2.5, I have containerized installation.

This is what I did:

  1. Created a namespace “community” in automation hub
  2. Download the collection tarball file from here
  3. Upload the collection to [automation hub]:[collections]

When I run my playbook, It still can’t find the model, this is the error:

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

My code is like this:

    - name: Read the CSV file
      community.general.read_csv:
        path: win.csv
      register: csv_data

Any help would be appreciated.

There is a process to sync collections from other GalaxyNG instances like the public galaxy. That’d be the best way to get it in.

Either way once it’s in you need to setup an execution environment with community.general installed into it (hopefully from your Private Automation Hub) or turn on the optional and legacy feature to install it on demand for every run containing that project. For a collection this is expressed in a file collections/requirements.yml.

Docs: Chapter 11. Projects | Red Hat Product Documentation

Id recommend the EE approach as it is an install once behavior so jobs will run faster. It also pairs well with local development using ansible-navigator.

1 Like

Hi,

Follow below guides:

  1. How to sync community content with Private Automation HUB
    Chapter 1. Red Hat Certified, validated, and Ansible Galaxy content in automation hub | Red Hat Product Documentation

  2. How to configure AAP Controller and Private Automation HUB integration
    Chapter 16. Projects | Red Hat Product Documentation