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/modules/system
quidame a5ca990857
filesystem: fix 355 state absent (#1149)
* 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>
2020-10-26 19:43:01 +01:00
..
aix_devices.py
aix_filesystem.py
aix_inittab.py
aix_lvg.py
aix_lvol.py
alternatives.py
awall.py
beadm.py
capabilities.py [capabilities] fix for a newer versions of libcap (#1061) 2020-10-16 21:03:54 +02:00
cronvar.py
crypttab.py
dconf.py
dpkg_divert.py
facter.py
filesystem.py filesystem: fix 355 state absent (#1149) 2020-10-26 19:43:01 +01:00
gconftool2.py
interfaces_file.py
iptables_state.py iptables_state: fix race condition between module and its action plugin (#1140) 2020-10-20 20:27:37 +02:00
java_cert.py
java_keystore.py
kernel_blacklist.py
launchd.py
lbu.py
listen_ports_facts.py
locale_gen.py
lvg.py
lvol.py
make.py
mksysb.py
modprobe.py
nosh.py
ohai.py
open_iscsi.py
openwrt_init.py
osx_defaults.py Make sure frenck is no longer accidentally contacted (#1133) 2020-10-20 13:43:19 +02:00
pam_limits.py
pamd.py
parted.py parted: proper fix for change of partition label case (#594) 2020-09-28 22:05:15 +02:00
pids.py
puppet.py
python_requirements_facts.py
python_requirements_info.py
runit.py
sefcontext.py
selinux_permissive.py
selogin.py
seport.py
shutdown.py
solaris_zone.py solaris_zone: fix zone configuration with python3 (#1082) 2020-10-14 21:18:04 +02:00
svc.py
syspatch.py
sysupgrade.py
timezone.py
ufw.py
vdo.py
xfconf.py
xfs_quota.py