1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

33 commits

Author SHA1 Message Date
Felix Fontein
be2de15c66
Adjust booleans in system modules (#5153)
* Adjust booleans in system modules.

* Fix some IP addresses

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-08-24 19:59:01 +02:00
Felix Fontein
496bf27b5c
Fix copyright lines (make sure 'Copyright' is there). (#5083) 2022-08-05 22:12:10 +02:00
Felix Fontein
123c7efe5e
Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt (#5065)
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.

* Replace 'Copyright:' with 'Copyright'

sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')

Co-authored-by: Maxwell G <gotmax@e.email>
2022-08-05 12:28:29 +02:00
Alexei Znamensky
5933d28dc4
xfconf: add command output to results (#5037)
* xfconf: add command output to results

* add changelog fragment

* add docs for return value cmd

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-01 11:21:06 +02:00
Alexei Znamensky
31ef6c914b
xfconf and xfconf_info: use do_raise (#4975)
* remove redundant XfConfException class

* adjusted indentation in the documentaiton blocks

* add changelog fragment
2022-07-24 12:09:24 +02:00
Alexei Znamensky
739ca737f1
cmd_runner: add __call__ method to invoke context (#4791)
* cmd_runner: add __call__ method to invoke context

* change xfconf to use the callable form

* add changelog fragment

* Update changelogs/fragments/4791-cmd-runner-callable.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-06-15 08:06:26 +02:00
Alexei Znamensky
8ba3d94740
xfconf module utils: providing a cmd_runner object (#4776)
* xfconf: changed implementation to use cmd_runner

* added module_utils/xfconf.py

* xfconf_info: using cmd_runner

* added module_utils to BOTMETA.yml

* added changelog fragment

* use cmd_runner_fmt instead of deprecated form
2022-06-06 10:38:46 +02:00
Alexei Znamensky
6052776de1
Multiple modules using ModuleHelper (#4674)
* Multiple modules using ModuleHelper

Replaced raising exception with calling method do_raise() in MH.
Removed the importing of the exception class.

* added changelog fragment
2022-05-23 07:19:24 +02:00
Alexei Znamensky
1a2fa802c0
[6.0.0] xfconf - deprecate parameter disable_facts (#4520)
* xfconf: deprecate parameter disable_facts

* added changelog fragment

* changed deprecation to 8.0.0

* Update changelogs/fragments/4520-xfconf-deprecate-disable-facts.yml

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

* added parameter deprecation

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-05-17 19:26:06 +02:00
Felix Fontein
54b2f0819d
[5.0.0] Bump version to 5.0.0, remove deprecated features (#4516)
* Remove deprecated features.

* Fix changelog.

* Remove ignore.txt entries.

* One more.

* Remove state=get tests.
2022-04-26 11:45:15 +02:00
Alexei Znamensky
a2bfb96213
xfconf: added missing value types (#4534)
* xfconf: added missing value types

* added changelog fragment

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-04-20 20:58:40 +02:00
Alexei Znamensky
3c6cb547f3
xfconf: improve docs (#4533) 2022-04-20 08:24:51 +02:00
Felix Fontein
9322809b3a
Fix return value documentation to use a valid value for 'type'. (#4142) 2022-02-02 20:58:27 +00:00
Alexei Znamensky
daabb53a2b
xfconf - using aggregated base class (#3919)
* xfconf - using aggregated base class

* added changelog fragment

* fixed typo
2021-12-19 14:17:17 +01:00
Felix Fontein
9546bbb55e
Remove deprecated options, aliases and defaults (#3461)
* Remove deprecated options, aliases and defaults.

* Add changelog fragment.

* Small fixes.

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Lint.

* Update plugins/modules/system/xfconf.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Bump galaxy version to 4.0.0.

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2021-10-12 13:56:15 +02:00
Alexei Znamensky
41101e55a0
module_helper - implemented classmethod to start the module (#3206)
* module_helper - implemented classmethod to start the module plus minor change

* rolled back the __changed__() method

* added changelog fragment

* Update plugins/module_utils/mh/base.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* no capt Piccards allowed in the base class

* removed extra piccards

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-08-17 10:43:18 +02:00
Alexei Znamensky
d54d2fa4a6
xfconf - deprecate get state in favour of the xfconf_info module (#3049)
* Deprecate get state in favour of the xfconf_info module

* added changelog fragment

* added comments in ignore files

* Update changelogs/fragments/3049-xfconf-deprecate-get.yaml

bummer, forgot that

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

* Update plugins/modules/system/xfconf.py

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

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-07-25 11:14:30 +02:00
Alexei Znamensky
9631de4939
fixed doc in xfconf (#3050) 2021-07-23 08:17:14 +02:00
Alexei Znamensky
d24fc92466
ModuleHelper - cmd params now taken from self.vars instead of self.module.params (#2517)
* cmd params now taken from self.vars instead of self.module.params

* added changelog fragment

* Update changelogs/fragments/2517-cmd-params-from-vars.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 22:44:00 +02:00
Alexei Znamensky
9aec9b502e
Applying ModuleHelper variable mgmt to xfconf -> improvements on MH (#2188)
* applying MH variable mgmt to xfconf - improvements on MH

* added changelog fragment
2021-04-06 21:21:05 +02:00
Alexei Znamensky
9a5191d1f9
xfconf - state absent was not honoring check_mode (#2185)
* state absent was not honoring check_mode

* added changelog fragment
2021-04-06 12:49:50 +02:00
Alexei Znamensky
585dd0b6ed
Improved ModuleHelper.run_command() (#1867)
* Improved run_command signature and behaviour

- extra_params has been removed from the signature
- params now can be either str or dict (containing the param value)

* Reverted the removal of the method parameter, and added changelog fragment

* Update changelogs/fragments/1867-modhelper-cmdmixin-dict-params.yml

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

* Update plugins/module_utils/module_helper.py

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

* adjustement per PR

* Update plugins/module_utils/module_helper.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-28 15:06:36 +01:00
Alexei Znamensky
af64c9a432
xfconf: feature flag to disable facts and deprecation warning (#1747)
* Added feature flag to disable facts and its associated deprecatoin warning

* added changelog fragment

* Update plugins/modules/system/xfconf.py

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

* Update plugins/modules/system/xfconf.py

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

* Update plugins/modules/system/xfconf.py

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

* Fixed deprecation message

* Fixed changelog frag

* Update changelogs/fragments/1475-xfconf-facts.yml

* Update plugins/modules/system/xfconf.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-10 19:42:40 +01:00
Matthew Campbell
8e53b3df6f
xfconf: add return values and expand test coverage (#1419)
* xfconf: add return values and expand test coverage

* fix pep8

* fix pylint

* fix returns yaml docs

* Add changelog fragemnt

* revert docts for `returned`

* Update changelogs/fragments/1419-xfconf-return-values.yaml

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

* Update plugins/modules/system/xfconf.py

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

* update return values to raw for scalar/lists

* another doc tweak: None -> none

* Break newline for pep8

* Fix merge mistake

* Back to list of strings

* fix yaml syntax

* Fall back to old way, deprecate returns, add ingores for errors

* add a note about dprecating facts

* Add depracation messages and fix docstring error

* remove deprecation of return values.

* Update plugins/modules/system/xfconf.py

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

* drop the deprecation message too

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-12 09:07:30 +01:00
Alexei Znamensky
e3fcc7de2a
Adding module_utils/module_helper.py + big revamp in xfconf.py to use it (#1322)
* 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
2020-11-20 11:27:53 +01:00
Alexei Znamensky
f4c63ede7f
Xfconf tests (#1305)
* Adjusted case in class names - transparent to users

* Adjustments to module code:

- No need to try/except everything, in fact it complicated debugging
- Replaced second call to xfconf.get() with xfconf.previous_value

* the actual test

* removed extraneous empty lines

* added changelog fragment

* rolled back removing the try/except around the main execution

* Update changelogs/fragments/1305-added-xfconf-tests.yaml

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

* Update plugins/modules/system/xfconf.py

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

* Removed extraneous import

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-11-16 11:27:00 +00:00
Alexei Znamensky
1202d034b3
Enabling validation-modules for system modules (#1212)
* fixed validation-modules for aix_devices.py

* fixed validation-modules for aix_filesystem.py

* fixed validation-modules for aix_inittab.py

* fixed validation-modules for aix_lvg.py

* fixed validation-modules for aix_lvol.py

* fixed validation-modules for awall.py

* fixed validation-modules for dconf.py

* fixed validation-modules for gconftool2.py

* fixed validation-modules for interfaces_file.py

* fixed validation-modules for java_keystore.py

* fixed validation-modules for kernel_blacklist.py

* fixed validation-modules for plugins/modules/system/lbu.py

* fixed validation-modules for plugins/modules/system/locale_gen.py

* fixed validation-modules for plugins/modules/system/lvg.py

* fixed validation-modules for plugins/modules/system/lvol.py

* fixed validation-modules for plugins/modules/system/mksysb.py

* fixed validation-modules for plugins/modules/system/modprobe.py

* fixed validation-modules for plugins/modules/system/nosh.py

* fixed validation-modules for plugins/modules/system/open_iscsi.py

* fixed validation-modules for plugins/modules/system/openwrt_init.py

* fixed validation-modules for plugins/modules/system/osx_defaults.py

* fixed validation-modules for plugins/modules/system/pamd.py

* fixed validation-modules for plugins/modules/system/pam_limits.py

* fixed validation-modules for plugins/modules/system/parted.py

* fixed validation-modules for plugins/modules/system/puppet.py

* fixed validation-modules for plugins/modules/system/python_requirements_info.py

* fixed validation-modules for plugins/modules/system/runit.py

the parameter "dist" is not used anywhere in the module

* fixed validation-modules for plugins/modules/system/sefcontext.py

* fixed validation-modules for plugins/modules/system/selogin.py

* fixed validation-modules for plugins/modules/system/seport.py

* fixed validation-modules for plugins/modules/system/solaris_zone.py

* fixed validation-modules for plugins/modules/system/syspatch.py

* fixed validation-modules for plugins/modules/system/vdo.py

* fixed validation-modules for plugins/modules/system/xfconf.py

* removed ignore almost all validate-modules lines in system

* removed unnecessary validations, per shippable test

* kernel_blacklist: keeping blacklist_file as str instead of path

* mksysb: keeping storage_path as str instead of path

* pam_limits: keeping dest as str instead of path

* rollback on adding doc for puppet.py legacy param

* rolledback param seuser required in selogin module

* rolledback changes in runit

* rolledback changes in osx_defaults

* rolledback changes in aix_defaults
2020-11-04 09:02:50 +01:00
Adriaan Callaerts
d13b026f47
Update xfconf.py: make locale-independent (#744)
* Update xfconf.py

- ensure correct behaviour, even in desktop environments which don't use English as the default language
- add double as content type

* set environ_update for entire module

* set envvar LANGUAGE instead of LANG because of priority order in evaluating them
2020-08-11 12:27:33 +02:00
Pierre Roudier
4a1d86c47e
Added uint type to xfconf module (#696)
* Added uint type to xfconf module

* Update changelogs/fragments/xfconf_add_uint_type.yml

Updated PR number in changelog

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

Co-authored-by: Pierre Roudier <pierre.roudier@ticksmith.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-07-28 10:40:40 +03:00
Alexei Znamensky
d40dece6c5
big revamp on xfconf, adding array values (#693)
* big revamp on xfconf, adding array values

* added changelog fragment

* Update changelogs/fragments/693-big-revamp-on-xfconf-adding-array-values.yml

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-07-25 13:58:14 +03:00
Andrew Klychkov
41cfdda6a3
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN

* fix

* fix

* fix
2020-07-13 21:50:31 +02:00
Andrew Klychkov
5d226f86b6
Remove ANSIBLE_METADATA (#339)
* Remove ANSIBLE_METADATA

* remove from other modules

* remove from plugins and scripts
2020-05-14 14:03:42 +01:00
Ansible Core Team
aebc1b03fd Initial commit 2020-03-09 09:11:07 +00:00