Version information
released Jun 27th 2016
This version is compatible with:
Start using this module
Add this module to your Puppetfile:
mod 'smithyuk-ec2_snapshot', '0.0.2'
Learn more about managing modules with a PuppetfileDocumentation
smithyuk/ec2_snapshot — version 0.0.2 Jun 27th 2016
ec2_snapshot for Puppet
This module will automate AWS EC2 snapshots via colinbjohnson's aws-missing-tools project and cron. Currently the module does not place credentials for AWS as I have another module to do this for me. It requires vcsrepo module.
EBS volumes tagged with the configured key/value in EC2 will be backed up (by default Backup=true).
Example usage
class { 'ec2_snapshot':
region => 'us-west-2',
extra_opts => ['-n'],
mailto => 'root@localhost',
}
TODO
- Configurable cron time for backup
- Configurable user/group
- Ability to place credentials with module (possibly with hiera-eyaml-gpg or other)
Notes
I would recommend creating a user specifically to handle backups and placing the relevant credentials in the ec2_snapshot user's ~/.aws/credentials
file.
Here is an example of the IAM policy for the user:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:Describe*",
"ec2:CreateSnapshot",
"ec2:DeleteSnapshot"
],
"Resource": "*"
}
]
}
Dependencies
- puppetlabs/stdlib (>= 3.2.1)
- puppetlabs/vcsrepo (>= 1.3.0)
The MIT License (MIT) Copyright (c) 2016 smithyuk Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.