I think I might favor resize=yes|no default no.



On Tue, Jul 15, 2014 at 1:16 PM, C. Morgan Hamill <[email protected]>
wrote:

> Excerpts from Michael DeHaan's message of 2014-07-15 11:37:33 -0400:
> > Can you share more about what the proposed syntax might be for this flag
> > (such as an example playbook line?)
>
> That's actually where I run into trouble; the filesystem module's
> arguments and their semantics don't leave a lot of room for extending.
>
> Currently, the filesystem module will create a filesystem if none
> exists, or create filesystem unconditionally when force=yes.
>
> I could imagine changing the behavior by adding a 'size' parameter, so
> that one could do the following:
>
>     ---
>     # creates a filesystem or resizes the filesystem to fit its block
> device
>     filesystem: dev=/dev/sda1 fstype=ext4
>
>     # creates a filesystem of a given size or expands an existing
> filesystem to 10g
>     filesystem: dev=/dev/sda1 fstype=ext4 size=10g
>
>     # creates a filesystem of a given size, or expands or *shrinks* as
> necessary
>     filesystem: dev=/dev/sda1 fstype=ext4 size=10g allow_shrinking=yes
>
>     # creates a filesystem unconditionally
>     filesystem: dev=/dev/sda1 fstype=ext4 size=10g force=yes
>
> This has the disadvantage of being kind of magic, and changing the
> module's current behavior when passed only 'dev' and 'fstype' (currently
> it leaves the filesystem untouched).
>
> Other alternatives might be adding a 'allow_resizing' parameter that
> defaulted to false and preserved the modules current behavior, making
> resizing opt-in.
>
> One could also imagine a 'state' parameter which took 'present' and
> 'absent' in addition to something like 'sized', where  only the latter
> triggers resizing.
>
> Obviously there will be sanity checks to avoid loss of data via
> shrinking, for example.
>
> Not sure about the best approach here.
> --
> Morgan Hamill
>
> --
> 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/1405443683-sup-1395%40al.wesleyan.edu
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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%2BnsWgzva8yNyYQk90WpF8C-LBC%2Bx5OpaqPsfSWEjOaVfwgQJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to