Hello Dylan/All,

I created a new module for our internal use, because the Ansible rds module 
defaults to use magnetic media which is not an option, or it will deploy with 
provisioned iops (where iops=1,000 is the minimum) which is too expensive for 
our use case. 

Note (played around with this today to find) the minimum allowable vol size and 
iops rate which can be used to force the ansible rds module to not use magnetic 
and use io1 (provisioned iops).  My bad if this is in the docs somewhere.
size: 100
iops: 1000

Perhaps I should have just kept my solution as a simple python script?
I did read previous work-arounds where folks were creating ansible "command" 
tasks which essentially call 'aws cli' to create an rds instance, but wanted to 
take another approach.

here is the public gist:
https://gist.github.com/cmcconnell1/aede4a19a2a41ab2850d55c16ee523f3 
<https://gist.github.com/cmcconnell1/aede4a19a2a41ab2850d55c16ee523f3>

Thank you for time and your response,
Chris   





> On Jun 14, 2017, at 3:36 PM, Dylan Silva <dylan.msi...@gmail.com> wrote:
> 
> Hi Chris,
> 
> Could you point us to your module?  Did you create a net new module, or have 
> you tried adding to the existing module (Preferred approach I might add).
> 
> Also, I suggest reaching out to #ansible-devel.  Someone there might be able 
> to help you!
> 
> On Wednesday, June 7, 2017 at 1:55:23 PM UTC-7, Chris McConnell wrote:
> Hello All,
> 
> Disclaimer this is my first Ansible (python) module.  
> I wrote for it for AWS RDS instance creation (because currently the ansible 
> RDS module only provisions instances with magnetic media and we require 
> gp2/ssd).
> 
> I am passing ENV vars and other standard variables to the module and it 
> completes and creates the RDS instances fine via boto3 calls, however, I'm 
> stuck on perhaps preventing boto3 from returning stdout (which is not in json 
> format), from the module which is causing the failure status?
> 
> 'Read the Ansible modules and boto docs and tried wrapping the boto3 response 
> with json, but then got errors that the boto3 stdout "is not JSON 
> serializable"
> print json.dumps(response)
> print json.dumps(error) 
> 
> 
> Below is my verbose stdout (omitting a lot of our vars/details)
> 
> ansible-playbook  -i "localhost," main.yml -vvv
> 
> 
> fatal: [localhost]: FAILED! => {
>     "changed": false,
>     "failed": true,
>     "module_stderr": "",
>     "module_stdout": "{u'DBInstance': {u'PubliclyAccessible': False, 
> u'MasterUsername'....
>     # <SNIP vars past to and used to create rds instance printed here>
>     'Accept-Encoding', 'content-length': '4847', 'content-type': 'text/xml', 
> 'date': 'Wed, 07 Jun 2017 20:13:33 GMT'}}}\n",
>     "msg": "MODULE FAILURE",
>     "rc": 0
> }
> 
> For now, I have set ignore to true, but would be grateful for any pointers on 
> how best to resolve this.
> Thank you!
> Chris
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Ansible Project" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/ansible-project/BYIErpm38gc/unsubscribe 
> <https://groups.google.com/d/topic/ansible-project/BYIErpm38gc/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> ansible-project+unsubscr...@googlegroups.com 
> <mailto:ansible-project+unsubscr...@googlegroups.com>.
> To post to this group, send email to ansible-project@googlegroups.com 
> <mailto:ansible-project@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/b0d6047d-bc40-42a2-baad-85ff45634a0b%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/ansible-project/b0d6047d-bc40-42a2-baad-85ff45634a0b%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8BDE033D-2C3C-4864-A32D-C12ED7B68D9C%40terradatum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to