AWX and AWS_SSM

Hi,

I am trying to integrate the aws_ssm plugin with AWX (15.0.1) that runs on Docker. The ansible version is 2.9.14.

While this works great under ansible on the command line and even Ansible Tower, it fails with the error below on AWX 15.0.1:

TASK [Create a Directory] ******************************************************
task path: /tmp/awx_167_imgbt_jb/project/create_directory.yml:11
fatal: [ip-172-28-73-141.eu-west-1.compute.internal]: FAILED! => {
“msg”: “the connection plugin ‘aws_ssm’ was not found”
}

I have the aws_ssm.py under the /usr/share/ansible/plugins/connection/ as well.

bash-4.4# ls -ltr /usr/share/ansible/plugins/connection/aws_ssm.py
-rw-r–r-- 1 root root 21073 Oct 29 17:44 /usr/share/ansible/plugins/connection/aws_ssm.py

I am not sure why this is failing and will appreciate your help.

Best!

Sidd

Hello,

You can try installing that module in the /var/lib/awx/ansible virtualenv since that’s the one used by default to run Ansible jobs from AWX.

Good luck!

Thank for replying Sergio!

I tried to install the plugin /var/lib/awx/ansible and even /var/lib/awx/.ansible and /usr/share/ansible as well.
I also tried modifying the /etc/ansible/ansible.cfg within the Docker environment. It does not work for some reason.

bash-4.4# uname -a
Linux awxweb 4.18.0-193.28.1.el8_2.x86_64 #1 SMP Fri Oct 16 13:38:49 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
bash-4.4# ls -ltr /var/lib/awx/ansible/plugins/connection/
total 24
-rw-r–r–. 1 root root 21073 Nov 3 13:01 aws_ssm.py
bash-4.4# ls -ltr /var/lib/awx/.ansible/plugins/connection/
total 24
-rw-r–r–. 1 root root 21073 Nov 3 13:12 aws_ssm.py
bash-4.4# ls -ltr /usr/share/ansible/plugins/connection/
total 24
-rw-r–r–. 1 root root 21073 Nov 1 12:57 aws_ssm.py

Just to double check on the overall path to the aws_ssm.py. Could you confirm this is right?

Sorry for the delay,

Have you tried installing the AWS collection?
https://galaxy.ansible.com/community/aws

In your project, include a collections/requirements.yml file, it should be installed when you update the project.
See https://docs.ansible.com/ansible/devel/user_guide/collections_using.html about how to complete the requirements.yml file

Good luck!