How to install ansible on amazon aws

ansibleansible-playbook

Having trouble running Ansible on the latest version of amazon linux.

[root@ip-10-0-0-11 ec2-user]# yum install ansible --enablerepo=epel
[root@ip-10-0-0-11 ec2-user]# ansible-playbook
Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 44, in <module>
    import ansible.playbook
ImportError: No module named ansible.playbook

Using AMI ID: ami-a10897d6.

Any ideas?

Best Solution

It appears that python library files do not have correct permissions by default. Running this fixed it for me.

[root@ip-10-0-0-11 ansible]# pip install ansible
Related Question