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
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
..
aix_devices.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
aix_filesystem.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
aix_inittab.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
aix_lvg.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
aix_lvol.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
alternatives.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
awall.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
beadm.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
capabilities.py [capabilities] fix for a newer versions of libcap (#1061) (#1110) 2020-10-16 21:23:43 +02:00
cronvar.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
crypttab.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
dconf.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
dpkg_divert.py Add version_added for all new features (#214) 2020-06-13 15:01:19 +02:00
facter.py Remove ANSIBLE_METADATA (#339) 2020-05-14 14:03:42 +01:00
filesystem.py filesystem: fix 355 state absent (#1149) (#1184) 2020-10-27 05:47:47 +01:00
gconftool2.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
interfaces_file.py interfaces_file: re.escape() old value (#880) 2020-09-12 20:10:31 +02:00
iptables_state.py iptables_state: fix race condition between module and its action plugin (#1140) (#1143) 2020-10-20 22:46:12 +02:00
java_cert.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
java_keystore.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
kernel_blacklist.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
launchd.py launchd: fix for user-level services (#899) (#970) 2020-09-28 07:15:48 +02:00
lbu.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
listen_ports_facts.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
locale_gen.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
lvg.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
lvol.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
make.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
mksysb.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
modprobe.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
nosh.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
ohai.py Fix M(). (#591) 2020-06-29 14:59:15 +02:00
open_iscsi.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
openwrt_init.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
osx_defaults.py Make sure frenck is no longer accidentally contacted (#1133) (#1134) 2020-10-20 14:04:27 +02:00
pam_limits.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
pamd.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
parted.py parted: proper fix for change of partition label case (#594) (#986) 2020-09-29 06:08:33 +02:00
pids.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
puppet.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
python_requirements_facts.py Initial commit 2020-03-09 09:11:07 +00:00
python_requirements_info.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
runit.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
sefcontext.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
selinux_permissive.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
selogin.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
seport.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
shutdown.py New module: shutdown (#700) 2020-08-18 08:29:38 +02:00
solaris_zone.py solaris_zone: fix zone configuration with python3 (#1082) (#1096) 2020-10-15 09:52:14 +02:00
svc.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
syspatch.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
sysupgrade.py sysupgrade: new module (#341) 2020-08-18 09:11:48 +02:00
timezone.py Use platform.system for Darwin comparisons (#945) (#972) 2020-09-28 08:48:50 +02:00
ufw.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
vdo.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
xfconf.py Update xfconf.py: make locale-independent (#744) 2020-08-18 08:30:24 +02:00
xfs_quota.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00