I've been implementing a bit of 1, 3, 4 to bring up ASG instances. I, like many people dislike having unnecessary software on my hosts (instances) so thought this could be another way to carry out the same process - Running Ansible from AWS Lambda https://medium.com/@jacoelho/ansible-in-aws-lambda-980bb8b5791b#.u8t6gsbvp
Though I haven't yet figured out how to do this yet with the 2.0 api of Ansible. It would be really nice because then you could further restrict the access/rights that the instances have. It's really annoying when you aren't using an elb and have to then also update route53 values when the instances comes up. On 25 February 2016 at 11:03, KeithA <[email protected]> wrote: > I am relatively new to Ansible (and config. management in general) so > please excuse me if I sound confused. I encourage you to correct me or > clarify me if I am wrong. > > I have setup an AWS Cloudformation template through AWS and not Ansible, > have defined my infrastructure, auto-scaling group and launch > configurations for out-scaling servers in a VPC. I understand I have a few > choices to bootstrap the servers as they are launched: (I'm not 100% sure > if these are the correct ways to implement the choices) > > 1. Use metadata & cloud-init in Cloudformation to run bash scripts > directly > 2. Pre-bake AMI's with packages and run playbooks locally when the > server is launched. > 3. Install packages, Ansible, copy playbooks from a private repo, and > run playbooks locally > 4. Install packages, Ansible, and use 'ansible-pull' > > What I am confused about is that choices #2,3,4 require Ansible to be > installed just to run a local playbook. But would the servers even use > Ansible after it's initial bootstrap? Is it really necessary to have > Ansible on the remote server (if so, could you explain a use case)? I'm > assuming after it's ready I would no longer use Ansible on the remote > server and instead provision/update the servers from my control server. > > I want to make it automated so that I don't have to: > > 1. install Ansible on the remote server *if *I don't have to or it can > be done another, more scalable, way. > 2. SSH into the remote server to install all the initial packages and > code manually. > > I was considering choice #1 because I can install packages, start nginx, > and my application through bash directly in the cloud-init/metadata. > However I am assuming it's not very dynamic. > > What are your thoughts/opinions/advice? Thank you for your help in > advance! > > -- > 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/0511462d-9c02-4a95-822a-ee98e8d06992%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/0511462d-9c02-4a95-822a-ee98e8d06992%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Steve -- 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/CA%2BemtqvyYO%2B2-n3FALY7ZY0rzUHpakOY3s0GvVtUViWibxiyew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
