Ansible RDS module "boto required for this module" (but other AWS modules can find boto)

257 views
Skip to first unread message

Edd Grant

unread,
Sep 5, 2016, 6:40:29 AM9/5/16
to Ansible Project
Hi all,

I'm using Ansible 2.1.1.0 in a virtualenv. I have been using the 'ec2' and 'cloudformation' modules in a Playbook with success. I am now trying to do some RDS stuff but I get the error "boto required for this module" when trying to run the following:

  - name: Get RDS instance facts
    rds:
      command: facts
      instance_name: "fabric-export-{{ item.db_name }}"
      aws_access_key: <redacted>
      aws_secret_key: <redacted>
    with_items: "{{ rds_postgres_instances }}"
    register: "rds_instance_{{ item.db_name }}_facts"
    tags: ['rds']


Where rds_postgres_instances is a hash variable that looks like this:

---
rds_postgres_instances:
  -
    db_name: SQ160528
    rds_master_user_password: redacted
  -
    db_name: SQ160716
    rds_master_user_password: redacted



Looking at the code of the rds module this would happen if boto.rds couldn't be imported. I have tried installing the boto package in the following places:

1: In the virtualenv (activate the virtualenv followed by pip install boto)
2: In the pyenv python that the virtualenv uses
3: In my system python installation (sudo apt-get install python-boto)

In each of the above cases I continue to get the "boto required for this module" error.

Grateful for any ideas as I'm tearing my hair out a bit over this one.

Cheers,

Edd

Environent details below:

(venv)➜  pcs-ansible git:(master) ✗ python --version
Python 2.7.10

(venv)➜  pcs-ansible git:(master) ✗ ansible --version
ansible 2.1.1.0
  config file = /Data/Programming/BBC/pcs/pcs-ansible/ansible.cfg
  configured module search path = Default w/o overrides

(venv)➜  pcs-ansible git:(master) ✗ pip freeze
ansible==2.1.1.0
boto==2.42.0
cffi==1.7.0
cryptography==1.5
enum34==1.1.6
idna==2.1
ipaddress==1.0.16
Jinja2==2.8
MarkupSafe==0.23
paramiko==2.0.2
psycopg2==2.6.2
pyasn1==0.1.9
pycparser==2.14
pycrypto==2.6.1
PyYAML==3.12
six==1.10.0

Reply all
Reply to author
Forward
0 new messages