Skip to content

Commit

Permalink
new module: filesize - create or resize a file, given its size (#2232)
Browse files Browse the repository at this point in the history
* new module: filesize

* description: create or resize a file, given its size
* with integration tests

* Update plugins/modules/files/filesize.py (version_added)

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update filesize.py (extends_documentation_fragment: use fqcn)

Co-authored-by: Amin Vakil <info@aminvakil.com>

* doc: use strict lowercase booleans (true/false) rather than other variants

* use *raw* type to manage size values

* drop 'miB' unit family

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* add more details

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
  • Loading branch information
4 people committed Apr 19, 2021
1 parent 91a0264 commit f87a39b
Show file tree
Hide file tree
Showing 10 changed files with 1,685 additions and 0 deletions.
483 changes: 483 additions & 0 deletions plugins/modules/files/filesize.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions plugins/modules/filesize.py
1 change: 1 addition & 0 deletions tests/integration/targets/filesize/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shippable/posix/group1
4 changes: 4 additions & 0 deletions tests/integration/targets/filesize/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
filesize_testdir: "/tmp/testdir"
filesize_testfile: "{{ filesize_testdir }}/testfile"
filesize_testlink: "{{ filesize_testdir }}/testlink"
Loading

0 comments on commit f87a39b

Please sign in to comment.