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] 7713202d9b
Adding module_utils/module_helper.py + big revamp in xfconf.py to use it (#1322) (#1336)
* Big revamp in xfconf.py

- added plugin/module_utils/module_helper.py
  - scaffold class for writing modules, beyond standard AnsibleModule
  - automatic capture of exceptions
  - easier dependency testing
  - StateMixin to easily handle different behaviours for 'state' param
  - CmdMixin to easily run external commands
- adapted test_xfconf.py
  - the args for run_command are now lists instead of a string
  - value and previous_value were not being tested before (because xfconf wasn't filling results - see below)
  - added more tests: setting value to previous_value, getting non-existent property
- rewritten xfconf module, keeping the same results
  - original module posted results as ansible_facts, this version still does it for compatibility, but also adds to the module result

* Added suggestions from the PR

* Added russoz as maintainer for the module_utils/module_helper.py file

* Formatting using printf-style requires special treatment

Strings not containing substitution tokens must work as well.

* Tidied up variables in module definition

* Tests with ArgFormat and DependencyCtxMgr

* pytest parameters must be in the same order, it seems

* improved testing for the DependencyCtxMgr

* fixed test for older pythons

* Moved changed property to improve readability

* Added testcase for state: absent and adjusted xfconf after it

* Fixed param name environ_update in run_command()

* added changelog fragment

* fixed tests after run_command param change

(cherry picked from commit e3fcc7de2a)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2020-11-20 12:43:23 +01:00
..
aix_devices.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
aix_filesystem.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
aix_inittab.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
aix_lvg.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
aix_lvol.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
alternatives.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
awall.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
beadm.py Unbreak beadm module (#1105) (#1210) 2020-10-31 14:09:43 +01: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 Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01: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 Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
interfaces_file.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01: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 Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
kernel_blacklist.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
launchd.py launchd: fix for user-level services (#899) (#970) 2020-09-28 07:15:48 +02:00
lbu.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01: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 Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
lvg.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
lvol.py Fix idempotent issue when using lvol with %VG or %PVS size options and VG is fully allocated (#229) (#1250) 2020-11-09 07:49:37 +00:00
make.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
mksysb.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
modprobe.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
nosh.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
ohai.py Fix M(). (#591) 2020-06-29 14:59:15 +02:00
open_iscsi.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
openwrt_init.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01: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 Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
pamd.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
parted.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
pids.py modules: fix examples to use FQCN for builtin modules (#648) 2020-07-14 18:28:08 +03:00
puppet.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
python_requirements_facts.py Initial commit 2020-03-09 09:11:07 +00:00
python_requirements_info.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
runit.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
sefcontext.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
selinux_permissive.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
selogin.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
seport.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
shutdown.py New module: shutdown (#700) 2020-08-18 08:29:38 +02:00
solaris_zone.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
svc.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00
syspatch.py Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01: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 Enabling validation-modules for system modules (#1212) (#1225) 2020-11-04 09:21:51 +01:00
xfconf.py Adding module_utils/module_helper.py + big revamp in xfconf.py to use it (#1322) (#1336) 2020-11-20 12:43:23 +01:00
xfs_quota.py modules: fix examples to use FQCN (#644) 2020-07-13 21:50:31 +02:00