Hi folks,
The goal was to provision an rds instance using ansible, which was easy
enough using this module: http://docs.ansible.com/rds_module.html
Unfortunately this module doesn't have the option to allow the RDS to pass
in publicly_accessible and ec2 defaults making it publicly accessible to
false. We'd like this seed our data on instance creation, proper security
groups are used ofcourse.
I tried modifying the module to include publicly_accessible where needed
but it looks the boto rds doesn't support it:
<localhost> REMOTE_MODULE rds size=10 password=VALUE_HIDDEN
publicly_accessible=true command=create instance_type=db.m1.small
instance_name=prod-rds2 engine_version=5.6
aws_access_key=AKIAJKMT2FVVHTPMEI6Q
aws_secret_key=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 region=us-west-1
vpc_security_groups=sg-905fb6f5 db_engine=MySQL subnet=prod-rds
username=admin
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009 && echo
$HOME/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009']
<localhost> PUT /tmp/tmpDEylEv TO
/home/iain/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009/rds
<localhost> EXEC ['/bin/sh', '-c', u'LC_CTYPE=C LANG=C /usr/bin/python
/home/iain/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009/rds; rm
-rf /home/iain/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009/
>/dev/null 2>&1']
failed: [localhost] => (item={'username': 'admin', 'subnet':
'prod-public-rds', 'db_engine': 'MySQL', 'name': 'prod-rds2',
'instance_type': 'db.m1.small', 'password': 'omitted_from_mailing_list',
'engine_version': 5.6, 'size': 10}) => {"failed": true, "item":
{"db_engine": "MySQL", "engine_version": 5.6, "instance_type":
"db.m1.small", "name": "prod-rds2", "password":
"omitted_from_mailing_list", "size": 10, "subnet": "prod-public-rds",
"username": "admin"}, "parsed": false}
invalid output was: Traceback (most recent call last):
File
"/home/iain/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009/rds",
line 2048, in <module>
main()
File
"/home/iain/.ansible/tmp/ansible-tmp-1402373676.78-265376028601009/rds",
line 487, in main
result = conn.create_dbinstance(instance_name, size, instance_type,
username, password, publicly_accessible, **params)
TypeError: create_dbinstance() got an unexpected keyword argument
'publicly_accessible'
Boto does have rds2 which does seem to support this:
https://github.com/boto/boto/blob/develop/boto/rds2/layer1.py
Is anyone interested in creating an rds2 module in ansible for this? Is
this the proper place to request such a module or are they generally user
provided?
Thank you,
iain
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a4dd2940-0158-474a-9ffc-d2ec73e9b77a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.