[ansible-project] Re: turn on boto debugging in Ansible (~/.boto)
Had the same issue. Here's what I did to get Boto debug working. Maybe some of these steps are not needed, I didn't take the time to investigate more. 1) Created a ~/.boto.cfg file as you did, with the following content (I put my AWS credentials here on purpose): [Boto] debug = 2 [Credentials] aws_access_key_id = ... aws_secret_access_key = ... 2) Made sure to *delete* ~/.aws/credentials so that Ansible picks up the previous Boto config file 3) and the most ugly part, monkey-patched the Ansible module I wanted to test (ec2_elb) to redirect Boto logs to a file, since I could never get the console/stdout output to work. On my system, the module I wanted Boto debug for was located in /Library/Python/2.7/site-packages/ansible/modules/cloud/amazon/ec2_elb.py. Just after the various import boto, import boto.ec2... lines, I added boto.set_file_logger('boto', 'boto.log', level=2) This creates the "boto.log" log file in the current directory from where you'll run your ansible-playbook comand. On Wednesday, May 25, 2016 at 7:59:58 PM UTC+8, Cos Bug wrote: > > Hi All, > > Is there any way to turn on boto debugging for Ansible playbooks? > > In user home directory I created .boto file with contents: > > [Boto] > debug = 2 > > But Ansible doesn't pick it up though the python script which invokes boto > prints the debug messages fine. > > Any ideas? > > Regards, > Constantin > -- 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/5a5a7445-8236-4104-b8d6-1730a1d816ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Re: RDS Module "promote" function not working. Reporting "ok", but not making a change.
Same problem here. No relevant output or error, but slave is not promoted. We use Ansible 1.9.2 and Boto 2.37.0. Should a Github issue be opened? On Tuesday, June 23, 2015 at 12:07:28 PM UTC-5, Sena Heydari wrote: > > The role play: > > - name: Promote Read-Replica to New Standalone RDS Instance > > rds: > > command: promote > > instance_name: new-db > > aws_access_key: "{{ some-key }}" > > aws_secret_key: "{{ some-secret }}" > > region: us-east-1 > > > Output from - (anonymized): > > > <127.0.0.1> REMOTE_MODULE rds region=us-east-1 command=promote > aws_access_key=some-key aws_secret_key=some-secret instance_name=new-db > > <127.0.0.1> EXEC ['/bin/sh', '-l', '-c', 'mkdir -p > $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376 && chmod a+rx > $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376 && echo > $HOME/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376'] > > <127.0.0.1> PUT /tmp/tmpvipCL4 TO > /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/rds > > <127.0.0.1> EXEC ['/bin/sh', '-l', '-c', u'LANG=en_US.UTF-8 > LC_CTYPE=en_US.UTF-8 /usr/bin/python > /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/rds; rm -rf > /home/dir/.ansible/tmp/ansible-tmp-1435075726.85-46917134810376/ >/dev/null > 2>&1'] > > ok: [127.0.0.1] => {"changed": false, "instance": {"availability_zone": > "us-east-1d", "backup_retention": 0, "create_time": 1435073003.518, > "endpoint": "new-db.account-num.us-east-1.rds.amazonaws.com", "id": > "new-db", "instance_type": "db.m3.large", "iops": null, > "maintenance_window": "mon:03:00-mon:03:30", "multi_zone": false, "port": > 3306, "replication_source": "source-db", "status": "available", "username": > "someroot", "vpc_security_groups": "sg-something"}} > > > Testing run with full RDS rights for user with access-key/secret. > > > Boto Version also up to date: > > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import boto > > >>> boto.Version > > '2.38.0' > > > Play runs as "ok", but I confirmed the DB is still read-replica in AWS > console. > > > Anything obvious I'm missing, or is this a bug? > -- 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/ba5e5349-574e-4b53-acd4-816d8d0c9dc9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Re: how to get ip address of an RDS instance using the RDS module ?
On Wednesday, October 23, 2013 5:47:12 PM UTC+2, Nicolas G wrote: After successfuly creating a new RDS instance I'm still not able to get the endpoint address in the playbook : - name: get RDS instance facts local_action: rds command=facts instance_name={{ instance_name }} region={{ region }} register: rds # RDS creation can take a long time for the status to be ready casuing problems for the - name: RDS endpoint is -- {{ rds.endpoint }} debug: msg= RDS endpoint is -- {{ rds.endpoint }} Since it also kept me stuck for a few moments: the solution is to query rds. *instance*.endpoint instead of rds.endpoint. -- 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/92d64812-8b48-4db9-8219-cbca2d472ba3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.