Ansible Error: ERROR! couldn’t resolve module/action ‘amazon.aws.ec2’

Error

ERROR! couldn't resolve module/action 'amazon.aws.ec2'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/root/forem/selfhost/playbooks/providers/aws.yml': line 170, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


  - name: "Launch Forem instance for {{ app_domain }}"
    ^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"

Solution

ansible-galaxy collection install amazon.aws:==3.3.1 --force
ansible-galaxy collection install community.aws
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x