On Mar 9, 2014, at 11:59 AM, Michael DeHaan <[email protected]> wrote:
> "Yes, I wrote this precisely because the inventory plugin didn't suit my > needs" > > The problem here is Ansible is trying to serve *everyone's* needs. If it > becomes a conglomeration of 500-ways-to-do-something, we quickly get into a > lot of sprawl. Well, someone highly placed in the Ansible project once told me that the inventory plugins were just examples, and not really supported... this would add a supported means of doing this... ;-) While I appreciate your point, the issue remains that the inventory script (apart from being an "example"), is not a callable piece of functionality. Having a module able to provide information about instances is highly valuable by allowing more flexibility. I get the feeling that the only reason this is objectionable is that it has to do with instances, which are considered inventory and hence in some way special. This seems to be a pretty good way to ensure that they are always treated specially, which will increase the friction any time someone needs to do something slightly different. Perhaps the better approach is to refactor both the ec2.py script and this module to share underpinnings, giving both an external inventory and internal module view on the same functionality. > > "I need to check to see if the instance exists; if not, I create it using a > base AMI in a particular VPC" > > The exact_count parameter in 1.5 would be a good choice here. There's also > a pull request to configure autoscaling groups (set the size to 1). Figures, that didn't exist when I wrote my playbook. > > It also seems like you could just use the ec2_ami module, aminator, or Packer. Packer is exactly what I've done with my playbook using ec2_ami, but I'd much rather use Ansible natively then integrate a bunch of other stuff to do something Ansible is capable of doing on its own. Regards, -scott -- 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/C0FD8B5B-CE47-431A-892E-A51E4F816C85%40gmail.com. For more options, visit https://groups.google.com/d/optout.
