1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
patchback[bot] c4e93b0b5f
filesystem: fix 355 state absent (#1149) (#1184)
* add support for filesystem removal (fix #355)

- Add 'state' option, defaults to 'present'.
- When state=absent, ignore other options (even 'dev' if the device
  doesn't exist)

* test filesystem state=absent (+ check_mode + idempotency)

* fix doc-required-mismatch

* add changelog fragment

* fix blkid return code

* ext4dev may be deprecated

* base checks on UUID instead

* Update changelogs/fragments/1149-filesystem-fix-355-state-absent.yml

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

* Update plugins/modules/system/filesystem.py (version_added)

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

* use array for new run_command() calls; do not wipefs if no fs found

* use dd as a fallback

* do not use bare 'except' (pep8)

* force string type

* use dd anyway (wipefs not supported everywhere, possibly buggy with vfat, etc.)

* do not truncate regular files; update changelog fragment

* doc: update state description and an example; notice check_mode support

* do not wipe mounted fs, fail instead

* back to wipefs implementation

* update test's main conditions

* update changelog fragment

* explicit types

* fail state=absent on freebsd

* remove doc-missing-type exceptions (2.9, 2.10, 2.11)

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit a5ca990857)

Co-authored-by: quidame <quidame@poivron.org>
2020-10-27 05:47:47 +01:00
..
action iptables_state: fix race condition between module and its action plugin (#1140) (#1143) 2020-10-20 22:46:12 +02:00
become Fix various sanity errors in plugins (#881) (#893) 2020-09-17 16:39:57 +00:00
cache cache/redis: feature redis sentinel (#1055) (#1130) 2020-10-20 10:00:16 +02:00
callback Improve plugin sanity (#966) (#984) 2020-09-29 04:04:05 +00:00
connection Improve plugin sanity (#966) (#984) 2020-09-29 04:04:05 +00:00
doc_fragments new module nomad_job & nomad_job_info (#867) (#1121) 2020-10-19 14:14:13 +02:00
filter JC plugin (#750) 2020-08-18 08:30:37 +02:00
inventory Add inventory plugin for Stackpath Edge Compute (#856) (#1013) 2020-09-30 13:52:47 +02:00
lookup Respect VAULT_SKIP_VERIFY envionment variable setting in hashi_vault lookup plugin (#1024) (#1062) 2020-10-09 15:30:11 +02:00
module_utils Support same reset actions on Managers as on Systems (#903) (#947) 2020-09-23 09:04:51 +02:00
modules filesystem: fix 355 state absent (#1149) (#1184) 2020-10-27 05:47:47 +01:00