On Thu, 23 Oct 2014 14:37:06 -0400 Ted Zlatanov <
t...@lifelogs.com> wrote:
TZ> I'd like to snapshot EC2 volumes only when needed. I couldn't find an
TZ> easy solution that didn't require calling out to boto or other tools.
TZ> If it exists, please ignore the following :) I wanted to ask here
TZ> before opening a feature or pull request.
Alternate suggestion for this new behavior: copy the ec2 module's count
options. It would add these options to ec2_snapshot.py:
...
exact_count:
version_added: "1.8"
description:
- An integer value which indicates how many snapshots that match the 'count_tag' parameter should be present. Snapshots are either created or terminated based on this value.
required: false
default: null
aliases: []
count_tag:
version_added: "1.8"
description:
- Used with 'exact_count' to determine how many snapshots based on a specific tag criteria should be present.
required: false
default: null
aliases: []
So when `exact_count` is omitted, things work like they do now, but if
it's specified, an `enforce_count()` function will be called.
Ted