Create DNS record from remote machine

16 views
Skip to first unread message

Alvaro Gil

unread,
Jul 5, 2016, 5:45:26 PM7/5/16
to Ansible Project
I am very new to Ansible so perhaps some concepts are still not clear to me.

I have a set of roles and playbooks working correctly to create ec2 instances, provision them and deploy.
I am looking for create DNS records for those instances, the "usual" approach seems to be create those immediately after create an ec2 instance and that works.
I would like to create a DNS record from the remote machine, that means in a playbook that matches other hosts than localhost, the problem is that I am not seeing a way to tell ansible to forward the same aws keys I being using and instead I am being able to force to add keys for route53 module. I know ENV vars will make it work, but since we are using profiles, I would like to keep it simple just by assigning a profile (boto) and run.

Thanks!

Stephen Granger

unread,
Jul 5, 2016, 5:56:47 PM7/5/16
to ansible...@googlegroups.com
You should probably associate the ec2 instance with an iam role that allows you to create route53 records if you want to carry this out from the ec2 instance.

You've not able to add the instance to a temporary inventory (add_host) and then carry out the route53 task from the local host?

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5bf49489-a406-4c23-adfb-8910a980b596%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve
Reply all
Reply to author
Forward
0 new messages