Community.general.rocketchat still/how usable in AWX playbooks?

Hello again!
I have a question about the rocketchat module:
Iam working on a Role to check for some gitgub releases for eg RocketChat Client and AWX-Operator and sent it via Rocketchat webhoock if there is a new verion only.
I created a playbook just for a testmessage and i get the error:

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

11Rocketchat_testmessage2.yaml:6:7: syntax-check[unknown-module]: couldn't resolve module/action 'community.general.rocketchat'. This often indicates a misspelling, missing collection, or incorrect module path.

playbook:

---
- name: Send test message to Rocket.Chat
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Send notification message via Rocket Chat all options
      community.general.rocketchat:
        domain: chat.gruen.net
        token: 'my/supersecrettoken'
        msg: 'This is a test message from AWX_Bot.'
        channel: '#AWX_Bot_Channel'
        username: 'AWX_Bot'
        # icon_url: 'http://www.example.com/some-image-file.png'
        link_names: 0
      delegate_to: localhost

I can add the rocketchat in the Notifications and the testmessage is alright.

Do i have a typo/logic error?
I think the problem is i need to install this community.general , but i have no idea how to.

I can edit the Message of the Rocketchat so so i have to set the variables in an own Notification setting for each Playbook?

Thank you in advance!

You’ll need to build a custom EE that includes community.general collection and run your jobs through that EE

Seth

Thank you!
I dont think i can just add stuff in a new ee and be habppy, but need to use the method with the AWX Builder?
I found tis reddit wich just hast the same issue i have.
Do you have a certain guide you would recommend before i start poking around?

I see that the setup of the Custom Execution enviroment depents on how your installation is set up.
My installation is with kubernetes with kustomize from this git.

You can have as many Execution Environments as you want, and can build them however you want. The recommended/supported method is to use ansible-builder to at least create the build context (generate the dockerfile, etc) and then you can hand that off to some other build pipeline.

The EE needs to be built and pushed somewhere that AWX can pull from. So some kind of image registry. Some K8ts have a native image registry that you can push to, but there’s things like Sonatype’s Nexus that you can use for self-hosting.

You can then modify your kustomize build to use your custom EE’s, or you can add them after the fact in the UI.

I can see why you’d want to have community.general baked into your EE, as that would avoid a lot of large pulls from galaxy. But, couldn’t you list community.general in your project’s ./collections/requirements.yml file and have it pulled in that way?

Yeah this would be the other solution but im rather lazy i would rather need a week or so to get thin via the execution enviroment so dont have to mind to add anything when i use those modules.
After some time i would not have in mind about adding the requiremants.yml.
And im the only at my company who manages the awx and i try to keep eveything as simple in the end

the the execution enviroment is something like a container/pod with its own function like the pod for the webserver, the one with db and, the other tho for management?
Does it stay when i pull a new version of the builder for updates?
And i have to choose thee execution enviroment i added in the templates

Highly recommend you leave it unspecified for most templates so that they will use the default. When you make a new EE available and test it to your satisfaction, change the default for your AWX installation and all your templates automatically switch to using the new default.

Thans what i wanted to say - would just use te custom one for the playbook with the rocketchat modules, but if there are default feature is in the same playbook will it still function?
Maybe i try to get something with default+custom in e new enviroment then?

my installation is at kubernetes and the ee would be created in Docker - will this be an issue?
Or do i have to adadpt the ee to kubernetes?

Theres a third option - i just could use the ee from other peaple from dockhub and add it.
:pirate_flag:

I can now use the rocketchat function.
You can eather use the requirements file or create a new ee yourself or use one frome someone else on docker hub.

Thank you very much you all!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.