findec2

Generate files based on machines found via EC2 tags
Sam Bashton

Sam Bashton

bashtoni

10,710 downloads

10,710 latest version

3.5 quality score

Version information

  • 1.0.0 (latest)
released Jul 3rd 2019

Start using this module

Tags: aws, ec2

Documentation

bashtoni/findec2 — version 1.0.0 Jul 3rd 2019

#findec2

A small Puppet module to use the https://github.com/BashtonLtd/find-ec2/ utility.

We use this to generate Varnish config and PHP snippets where one might otherwise use PuppetDB and stored configuration.

Usage

To generate a Varnish VCL snippet with backends of all machines which have a tag 'machinetype' and value 'web':


  findec2::generate { 'web':
    template  => '/etc/find-ec2/templates/varnish.template',
    service   => 'varnish',
    output    => '/etc/varnish/web.vcl',
    frequency => '1',
    tagname   => 'machinetype',
    tagvalue  => 'web',
    dummy     => true,
  }

Contributing

Pull requests gratefully accepted. Basic tests have been provided; run rake test.