IAM Roles with Ansible

Example of role with custom trust policy for Lambda service

Hi,

I believe it is ‘tasks:’

Vincent

Made the modification still no luck:

ansible-playbook -i /etc/ansible/local Dev-Test-IAM-pwr.yaml
ERROR! playbooks must be a list of plays

The error appears to have been in /Dev-Test-IAM-pwr.yaml’: line 3, column 1, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

Looks like a spacing issue. Your list of tasks needs to be indented two spaces.

Ok I ran by using the command ansible-playbook -i /etc/ansible/local Dev-Test-IAM.yml

Is that the fault? Do I need to specifically call the module into play? Example: the EC2_Group in the past the module was called out in the yml file. But I see that has changed.

`

Spacing was changed and I am really at a loss.
Python 2.7.12

ansible 2.3.0

Mac

If someone can create an example that works, I will be willing to try that, to be able to move forward.

Any help?

Is the file that you're showing here a playbook, or a role file?

If it's a playbook, it needs more stuff than just the list of tasks. See
https://docs.ansible.com/ansible/playbooks_intro.html for some basics.

                                      -Josh (jbs@care.com)

(apologies for the automatic corporate disclaimer that follows)

This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.

Yep that was it, thanks for the pointer! This throws errors but this is the right direction.

`