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

838 commits

Author SHA1 Message Date
Anton Nikolaev
1a4af9bfc3
Reduce stormssh searches based on host (#2568)
* Reduce stormssh searches based on host

Due to the stormssh searches in the whole config values, we need to reduce the search results based on the full matching of the hosts

* Removed whitespaces in the blank line

* Added changelog fragment and tests for the fix.

* Added newline at the end of the changelog fragment

* Added newline at the end of the tests

* Fixed bug with name in tests

* Changed assertion for the existing host

* Update changelogs/fragments/2568-ssh_config-reduce-stormssh-searches-based-on-host.yml

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

* Adjusted tests

* New line at the end of the tests

Co-authored-by: Anton Nikolaev <anikolaev@apple.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-05 14:53:02 +02:00
christophemorio
c49a384a65
Terraform: ensure workspace is reset to current value (#2634)
* fix: ensure workspace is reset to current value

* chore: linter

* chore: changelog
2021-06-04 19:12:29 +02:00
Alex Willmer
a343756e6f
Fix repeated word in description of fs_type (#2717) 2021-06-04 19:11:46 +02:00
rainerleber
a4f46b881a
Add module sapcar_extract to make SAP administration easier. (#2596)
* add sapcar

* integrate test

* test integration

* Revert "integrate test"

This reverts commit 17cbff4f02.

* add requiered

* change test

* change binary

* test

* add bin bath

* change future

* change download logic

* change logic

* sanity

* Apply suggestions from code review

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

* add url and error handling

* sanity

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* cleanup and fixes

* sanity

* add sec library

* add description

* remove blanks

* sanity

* Apply suggestions from code review

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

Co-authored-by: Rainer Leber <rainer.leber@sva.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-06-04 07:36:35 +02:00
George Rawlinson
5ddf0041ec
add module pacman_key (#778)
* add module pacman_key

* add symlink and fix documentation for pacman_key

* documentation fix for pacman_key

* improve logic around user input

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Update plugins/modules/packaging/os/pacman_key.py

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

* Improve parameter checking

required_one_of=[] is neat.

Co-authored-by: Alexei Znamensky

* Revert "Improve parameter checking"

This reverts commit 044b0cbc85.

* Simplify a bunch of code.

* fix typos pointed out by yan12125

* replaced manual checks with required-if invocation

* added default keyring to documentation

* some initial tests

* updated metadata

* refactored to make sanity tests pass

* refactor to make sanity tests pass ... part deux

* refactor: simplify run_command invocations

* test: cover check-mode and some normal operation

* docs: fix grammatical errors

* rip out fingerprint code

a full length (40 characters) key ID is equivalent to the fingerprint.

* refactor tests, add a couple more

* test: added testcase for method: data

* Update plugins/modules/packaging/os/pacman_key.py

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

* docs: correct yaml boolean type

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-04 07:08:54 +02:00
Benjamin Schubert
efbda2389d
keycloak_realm.py: Fix the ssl_required parameter according to the API (#2693)
* keycloak_realm.py: Fix the `ssl_required` parameter according to the API

The `ssl_required` parameter is a string and must be one of 'all',
'external' or 'none'. Passing a bool will make the server return a 500.

* fixup! keycloak_realm.py: Fix the `ssl_required` parameter according to the API

* Update changelogs/fragments/keycloak_realm_ssl_required.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-03 21:44:54 +02:00
Benjamin Schubert
fe5717c1aa
keycloak_realm.py: Mark 'reset_password_allowed' as no_log=False (#2694)
* keycloak_realm.py: Mark 'reset_password_allowed' as no_log=False

This value is not sensitive but Ansible will complain about it otherwise

* fixup! keycloak_realm.py: Mark 'reset_password_allowed' as no_log=False

* Apply all suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-03 21:42:05 +02:00
Gene Gotimer
ca1506fb26
Added SHA1 option to maven_artifact (#2662)
* Added SHA1 option

* Add changelog fragment

* Update plugins/modules/packaging/language/maven_artifact.py

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

* Update plugins/modules/packaging/language/maven_artifact.py

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

* Combined hash functions

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

* Update plugins/modules/packaging/language/maven_artifact.py

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

* Update plugins/modules/packaging/language/maven_artifact.py

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

* Removed unused functions (rolled into _local_checksum)

* Update changelogs/fragments/2661-maven_artifact-add-sha1-option.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-01 22:06:26 +02:00
Chih-Hsuan Yen
1ad85849af
nmcli: new arguments to ignore automatic dns servers and gateways (#2635)
* nmcli: new arguments to ignore automatic dns servers and gateways

Closes #1087

* Add changelog fragment

* Address review comments
2021-06-01 22:04:09 +02:00
Ajpantuso
b6c0cc0b61
archive - Adding exclusion_patterns option (#2616)
* Adding exclusion_patterns option

* Adding changelog fragment and Python 2.6 compatability

* Minor refactoring for readability

* Removing unneccessary conditional

* Applying initial review suggestions

* Adding missed review suggestion
2021-05-31 07:51:29 +02:00
Alexei Znamensky
bef3c04d1c
Fixed sanity checks for cloud/online/ modules (#2677)
* fixed validation-modules for plugins/modules/cloud/online/online_server_info.py

* fixed validation-modules for plugins/modules/cloud/online/online_user_info.py

* sanity fix
2021-05-29 16:48:59 +02:00
quidame
f09c39b71e
iptables_state: fix broken query of async_status result (#2671)
* use get() rather than querying the key directly

* add a changelog fragment

* re-enable CI tests

* Update changelog fragment

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-29 10:50:24 +02:00
Ajpantuso
b281d3d699
proxmox_kvm - Fixed vmid result when VM with name exists (#2648)
* Fixed vmid result when VM with name exists

* Adding changelog fragment
2021-05-29 09:00:12 +02:00
Amin Vakil
c3cab7c68c
composer: add composer_executable (#2650)
* composer: add composer_executable

* Add changelog

* Improve documentation thanks to felixfontein

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-28 12:49:29 +02:00
Alexei Znamensky
3afcf7e75d
minor refactors on plugins/modules/cloud/misc (#2557)
* minor refactors on plugins/modules/cloud/misc

* added changelog fragment

* removed unreachable statement

* Update plugins/modules/cloud/misc/terraform.py

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

* Update plugins/modules/cloud/misc/rhevm.py

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

* adjusted per PR comment

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-27 19:13:21 +02:00
Abhijeet Kasurde
43c12b82fa
random_string: a new lookup plugin (#2572)
New lookup plugin to generate random string based upon
constraints.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 19:09:26 +02:00
Merouane Atig
95794f31e3
Fix drain example with correct wait values (#2603) 2021-05-27 19:08:35 +02:00
Abhijeet Kasurde
795125fec4
xml: Add an example for absent (#2644)
Element node can be deleted based upon the attribute
value.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-27 19:04:52 +02:00
christophemorio
285639a4f9
Terraform overwrite init (#2573)
* feat: implement overwrite_init option

* chore: changelog
2021-05-27 19:03:39 +02:00
Felix Fontein
7cd96d963e
meta/runtime.yml and __init__.py cleanup (#2632)
* Remove superfluous __init__.py files.

* Reformat and sort meta/runtime.yml.

* The ovirt modules have been removed.

* Add changelog entry.
2021-05-27 18:49:26 +02:00
rainerleber
b79969da68
Add module hana_query to make SAP HANA administration easier. (#2623)
* new

* move link

* Apply suggestions from code review

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

* add more interesting return value in test

* remove unused objects

* removed unneeded function

* extend test output

* Update tests/unit/plugins/modules/database/saphana/test_hana_query.py

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

Co-authored-by: Rainer Leber <rainer.leber@sva.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-27 18:46:12 +02:00
quidame
909e9fe950
fix a regression in initialization_from_null_state() (iptables-nft > 1.8.2) (#2604) 2021-05-27 08:47:16 +02:00
sgalea87
4aa50962cb
influxdb_user: Fix bug introduced by PR 2499 (#2614)
* Update influxdb_user.py

Fixed function name

* Create 2614-influxdb_user-fix-issue-introduced-in-PR#2499

Added changelog

* Rename 2614-influxdb_user-fix-issue-introduced-in-PR#2499 to 2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml

Fixed extension

* Update changelogs/fragments/2614-influxdb_user-fix-issue-introduced-in-PR#2499.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-27 08:01:28 +02:00
Sylvia van Os
26757edfb2
Add one-liner lookup example (#2615)
* Add one-liner lookup example

* Remove trailing whitespace

* Update plugins/lookup/tss.py

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

* Update plugins/lookup/tss.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-27 07:57:06 +02:00
Alexei Znamensky
4764a5deba
redis cache - better parsing of connection uri (#2579)
* better parsing of connection uri

* added changelog fragment

* fixed tests for ansible 2.9

* Update tests/unit/plugins/cache/test_redis.py

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

* Update tests/unit/plugins/cache/test_redis.py

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

* Adjustments from PR

* Update test_redis.py

* Update test_redis.py

* Update plugins/cache/redis.py

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

* Update plugins/cache/redis.py

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

* Update tests/unit/plugins/cache/test_redis.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-26 07:07:09 +02:00
Alexei Znamensky
aa74cf4d61
ini_file - added note in documentation for utf-8 bom (#2599)
* added note in documentation for utf-8 bom

* Update plugins/modules/files/ini_file.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-26 07:06:23 +02:00
Alexander Moiseenko
6df3685d42
jenkins_plugin: HTTP Error 405: Method Not Allowed on disable/enable plugin #2510 (#2511)
* define POST method for pluginManager api requests

Jenkins makeEnable/makeDisable api requests requires to use POST method

* add changelog fragment

* fix my yoda lang thx to aminvakil

Co-authored-by: Amin Vakil <info@aminvakil.com>

* update changelog fragment

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-26 07:00:53 +02:00
Brian Coca
d871399220
json_query, no more 'unknown type' errors (#2607)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-25 13:04:19 +02:00
DasSkelett
63012eef82
Use str() to get exception message (#2590) 2021-05-25 12:58:20 +02:00
Tong He
593d622438
rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases (#2571)
* rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases.

* Fix the unit test error: The new release_matcher could pass a wider range of patterns but that would not cause extra issue to the whole module.

* Submit the changelog fragment.

* Update changelogs/fragments/2571-rhsm_release-fix-release_matcher.yaml

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-24 21:59:52 +02:00
Alexei Znamensky
cc293f90a2
ini_file - opening file as utf-8-sig (#2578)
* opening file as utf-8-sig

* added changelog fragment

* using io.open()

* Update tests/integration/targets/ini_file/tasks/main.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-22 22:20:37 +02:00
absynth76
8f083d5d85
java_cert - fix incorrect certificate alias on pkcs12 import (#2560)
* fix wrong certificate alias used when importing pkcs12, modify error output, stdout is more relevant than stderr

* add changelog fragment

* fix changelog fragment
2021-05-22 13:33:27 +02:00
Abhijeet Kasurde
852e240525
Add missing author name (#2570)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-21 18:45:22 +02:00
momcilo78
7a169af053
Add comment_visibility parameter for comment operation for jira module (#2556)
* Add comment_visibility parameter for comment operation for jira module

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

* Update plugins/modules/web_infrastructure/jira.py

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

* Update plugins/modules/web_infrastructure/jira.py

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

* addressed pep8 E711

* Added missing parameter.

* params is not in use anymore.

* It appears other modules are using options, where in documentation they use suboptions. Inconsistancy?

* adjusted indentation

* tweaked suboptions, fixed documentation

* Added fragment

* Update changelogs/fragments/2556-add-comment_visibility-parameter-for-comment-operation-of-jira-module.yml

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

* Update plugins/modules/web_infrastructure/jira.py

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

Co-authored-by: felixfontein <felix@fontein.de>
2021-05-20 22:06:00 +02:00
Alexei Znamensky
1403f5edcc
ModuleHelper: CmdMixin custom function for processing cmd results (#2564)
* MH: custom function for processing cmd results

* added changelog fragment

* removed case of process_output being a str
2021-05-20 19:43:16 +02:00
Andre Lehmann
c4624d3ad8
pacman: add 'executable' option to use an alternative pacman binary (#2524)
* Add 'bin' option to use an alternative pacman binary

* Add changelog entry

* Incorporate recommendations

* Update plugins/modules/packaging/os/pacman.py

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-18 12:59:11 +02:00
quidame
2c1ab2d384
iptables_state: fix per-table initialization command (#2525)
* refactor initialize_from_null_state()

* Use a more neutral command (iptables -L) to load per-table needed modules.

* fix 'FutureWarning: Possible nested set at position ...' (re.sub)

* fix pylints (module + action plugin)

* unsubscriptable-object
* superfluous-parens
* consider-using-in
* unused-variable
* unused-import
* no-else-break

* cleanup other internal module_args if they exist

* add changelog fragment

* Apply suggestions from code review (changelog fragment)

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

* Remove useless plugin type in changelog fragment

Co-authored-by: Amin Vakil <info@aminvakil.com>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-05-18 11:51:37 +02:00
quidame
f6db0745fc
filesystem: revamp module (#2472)
* revamp filesystem module to prepare next steps

* pass all commands to module.run_command() as lists
* refactor grow() and grow_cmd() to not need to override them so much
* refactor all existing get_fs_size() overrides to raise a ValueError if
  not able to parse command output and return an integer.
* override MKFS_FORCE_FLAGS the same way for all fstypes that require it
* improve documentation of limitations of the module regarding FreeBSD
* fix indentation in DOCUMENTATION
* add/update function/method docstrings
* fix pylint hints

filesystem: refactor integration tests

* Include *reiserfs* and *swap* in tests.
* Fix reiserfs related code and tests accordingly.
* Replace "other fs" (unhandled by this module), from *swap* to *minix*
  (both mkswap and mkfs.minix being provided by util-linux).
* Replace *dd* commands by *filesize* dedicated module.
* Use FQCNs and name the tasks.
* Update main tests conditionals.

* add a changelog fragment

* Apply suggestions from code review

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

* declare variables as lists when lists are needed

* fix construction without useless conversion

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-18 06:46:45 +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
Xabier Napal
b89eb87ad6
influxdb_user: allow creation of first user with auth enabled (#2364) (#2368)
* influxdb_user: allow creation of first user with auth enabled (#2364)

* handle potential exceptions while parsing influxdb client error

* fix changelog

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

* influxdb_user: use generic exceptions to be compatible with python 2.7

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 21:00:35 +02:00
Alexei Znamensky
2a376642dd
ModuleHelper - better mechanism for customizing "changed" behaviour (#2514)
* better mechanism for customizing "changed" behaviour

* dont drink and code: silly mistake from late at night

* added changelog fragment
2021-05-17 20:28:21 +02:00
quidame
2b1eff2783
java_keystore: pass in secret to keytool via stdin (#2526)
* java_keystore: pass in secret to keytool via stdin

* add changelog fragment
2021-05-17 20:05:24 +02:00
Lauri Tirkkonen
dc0a56141f
zfs_delegate_admin: drop choices from permissions (#2540)
instead of whitelisting some subset of known existing permissions, just
allow any string to be used as permissions. this way, any permission
supported by the underlying zfs commands can be used, eg. 'bookmark',
'load-key', 'change-key' and all property permissions, which were
missing from the choices list.
2021-05-17 18:55:00 +02:00
Alexei Znamensky
345d5f2dfa
snap - revamp + implementing enabled/disabled states (#2411)
* revamp of snap module

* added changelog fragment

* fixed description

* Update changelogs/fragments/2411-snap-revamp-enabled-disabled-states.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 14:03:15 +02:00
Jan Baier
350380ba8c
Add option missing to passwordstore lookup (#2500)
Add ability to ignore error on missing pass file to allow processing the
output further via another filters (mainly the default filter) without
updating the pass file itself.

It also contains the option to create the pass file, like the option
create=true does.

Finally, it also allows to issue a warning only, if the pass file is not
found.
2021-05-17 13:50:40 +02:00
Dennis Israelsson
448b8cbcda
fix error when cache is disabled (#2518) 2021-05-17 07:35:15 +02:00
sgalea87
ea200c9d8c
Update influxdb_user.py Fixed Multiple No Privileges (#2499)
* Update influxdb_user.py

Fixed Multiple No Privileges

* Update influxdb_user.py

Fixed line spaces

* Update influxdb_user.py

Fixed whitespace

* Create 2499-influxdb_user-fix-multiple-no-privileges.yml 

Added changelog
2021-05-17 07:33:40 +02:00
iridian
5b77515308
1085 updating the hcl whitelist to include all supported options (#2495)
* 1085 updating the hcl whitelist to include all supported options

* Update changelogs/fragments/1085-consul-acl-hcl-whitelist-update.yml

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

Co-authored-by: Dillon Gilmore <dgilmor@rei.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-17 07:32:51 +02:00
Alexei Znamensky
c8f402806f
Cleanup connections plugins (#2520)
* minor refactors

* minor refactors in plugins/connection/saltstack.py

* minor refactors in plugins/connection/qubes.py

* minor refactor in plugins/connection/lxc.py

* minor refactors in plugins/connection/chroot.py

* minor refactors in plugins/connection/funcd.py

* minor refactors in plugins/connection/iocage.py

* minor refactors in plugins/connection/jail.py

* added changelog fragment
2021-05-16 13:24:37 +02:00
Ajpantuso
a385cbb11d
java_keystore: New ssl_backend option for cryptography (#2485)
* Adding cryptography as a backend for OpenSSL operations

* Updating unit tests and adding changelog fragment

* Allowing private key password option when using unprotected key

* Incorporating suggestions from initial review

* Centralizing module exit path
2021-05-14 22:31:44 +02:00
Abhijeet Kasurde
5d0a7f40f2
random_pet: Random pet name generator (#2479)
A lookup plugin to generate random pet names based
upon criteria.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2021-05-14 10:55:27 +02:00
Amin Vakil
e2dfd42dd4
proxmox_nic: set mtu on interface even if it's not virtio (#2505)
* Set mtu on interface whatsoever

* add changelog fragment

* Revert "add changelog fragment"

This reverts commit 5f2f1e7feb.
2021-05-14 10:33:30 +02:00
Amin Vakil
054eb90ae5
gitlab_user: add expires_at option (#2450)
* gitlab_user: add expires_at option

* Add changelog

* Add integration test

* Add expires_at to addSshKeyToUser function

* password is required if state is set to present

* Check expires_at will not be added to a present ssh key

* add documentation about present ssh key

* add expires_at to unit tests

* Improve documentation

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

* Only pass expires_at to api when it is not None

* Emphasize on SSH public key

* Apply felixfontein suggestion

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-14 10:00:59 +02:00
Felix Fontein
ee9770cff7
Deprecate nios content (#2458)
* Deprecate nios content.

* Make 2.9's ansible-test happy.

* Add module_utils deprecation.
2021-05-13 21:50:40 +02:00
Felix Fontein
384655e15c
Add groupby_as_dict filter (#2323)
* Add groupby_as_dict filter.

* Test all error cases.
2021-05-13 21:49:57 +02:00
Kogelvis
23dda56913
Add proxmox_nic module (#2449)
* Add proxmox_nic module

Add proxmox_nic module to manage NIC's on Qemu(KVM) VM's in a Proxmox VE
cluster.
Update proxmox integration tests and add tests for proxmox_nic module.

This partially solves https://github.com/ansible-collections/community.general/issues/1964#issuecomment-790499397
and allows for adding/updating/deleting network interface cards after
creating/cloning a VM.

The proxmox_nic module will keep MAC-addresses the same when updating a
NIC. It only changes when explicitly setting a MAC-address.

* Apply suggestions from code review

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

* Add check_mode and implement review comments

- check_mode added
- some documentation updates
- when MTU is set, check if the model is virtio, else fail
- trunks can now be provided as list of ints instead of vlanid[;vlanid...]

* Make returns on update_nic and delete_nic more readable

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

* Increase readability on update_nic and delete_nic

* Implement check in get_vmid

- get_vmid will now fail when multiple vmid's are returned as proxmox
  doesn't guarantee uniqueness
- remove an unused import
- fix a typo in an error message

* Add some error checking to get_vmid

- get_vmid will now return the error message when proxmoxer fails
- get_vmid will return the vmid directly instead of a list of one
- Some minor documentation updates

* Warn instead of fail when setting mtu on unsupported nic

- When setting the MTU on an unsupported NIC model (virtio is the only
  supported model) this module will now print a warning instead of
  failing.
- Some minor documentation updates.

* Take advantage of proxmox_auth_argument_spec

Make use of proxmox_auth_argument_spec from plugins/module_utils/proxmox.py
This provides some extra environment fallbacks.

* Add blank line to conform with pep8

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-13 21:48:49 +02:00
Alexei Znamensky
265d034e31
linode - docs/validation changes + minor refactorings (#2410)
* multiple changes:

- documentation fixes
- minor refactorings

* added param deprecation note to the documentation

* added changelog fragment

* Update changelogs/fragments/2410-linode-improvements.yml

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

* Update changelogs/fragments/2410-linode-improvements.yml

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

* Update plugins/modules/cloud/linode/linode.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-12 17:37:31 +02:00
Xabier Napal
83a0c32269
influxdb_retention_policy - add state argument to module spec (#2383) (#2385)
* influxdb_retention_policy: add state option to module argument spec

* influxdb_retention_policy: simplify duration parsing logic (suggested in #2284)

* add changelog

* fix documentation and changelog

* add constants for duration and sgduration validations

* restyle ansible module spec

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

* improve changelog

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

* set changed result in check mode for state absent

* remove required flag in optional module arguments

* influxdb_retention_policy: improve examples readability

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-12 17:33:27 +02:00
spike77453
b9fa9116c1
nmcli: Remove dead code, 'options' never contains keys from 'param_alias' (#2417)
* nmcli: Remove dead code, 'options' never contains keys from 'param_alias'

* Update changelogs/fragments/2417-nmcli_remove_dead_code.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-11 19:35:30 +02:00
CWollinger
0912e8cc7a
discord.py: Add new module for discord notifications (#2398)
* first push: add discord module and test for notifications

* fix the yaml docs and edit the result output

* add link

* fix link

* fix docs and remove required=False in argument spec

* add elements specd and more info about embeds

* called str...

* elements for embeds oc.

* fix typo's in description and set checkmode to false

* edit docs and module return

* support checkmode with get method

* fix unit test

* handle exception and add new example for embeds

* quote line

* fix typos

* fix yaml
2021-05-11 19:31:46 +02:00
Alexei Znamensky
d22dd5056e
module_helper.py Breakdown (#2393)
* break down of module_helper into smaller pieces, keeping compatibility

* removed abc.ABC (py3 only) from code + fixed reference to vars.py

* multiple changes:

- mh.base - moved more functionalities to ModuleHelperBase
- mh.mixins.(cmd, state) - CmdMixin no longer inherits from ModuleHelperBase
- mh.mixins.deps - DependencyMixin now overrides run() method to test dependency
- mh.mixins.vars - created class VarsMixin
- mh.module_helper - moved functions to base class, added VarsMixin
- module_helper - importing AnsibleModule as well, for backward compatibility in test

* removed unnecessary __all__

* make pylint happy

* PR adjustments + bot config + changelog frag

* Update plugins/module_utils/mh/module_helper.py

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

* Update plugins/module_utils/mh/module_helper.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-11 19:31:10 +02:00
TrevorSquillario
9d46ccf1b2
modified redfish_config and idrac_redfish_config to skip incorrect attributes (#2334)
* modified redfish_config and idrac_redfish_config to skip incorrect attributes

Signed-off-by: Trevor Squillario Trevor_Squillario@Dell.com

* modified redfish_utils.py and idrac_redfish_config.py to return empty warning message

* modified redfish_config.py and idrac_redfish_config.py to use module.warn()

* updated changelog fragment for pr 2334
2021-05-11 19:30:09 +02:00
Felix Fontein
eea4f45965
Add dependent lookup plugin (#2164)
* Add dependent lookup plugin.

* Use correct YAML booleans.

* Began complete rewrite.

* Only match start of error msg.

* Improve tests.

* Work around old Jinja2 versions.

* Fix metadata.

* Fix filter name.
2021-05-11 19:27:05 +02:00
sam-lunt
8e7aff00b5
Avoid incorrectly marking zfs tasks as changed (#2454)
* Avoid incorrectly marking zfs tasks as changed

The zfs module will incorrectly mark certain tasks as having been
changed. For example, if a dataset has a quota of "1G" and the user
changes it to "1024M", the actual quota vale has not changed, but since
the module is doing a simple string comparison between "1G" and "1024M",
it marks the step as "changed".

Instead of trying to handle all the corner cases of zfs (another example
is when the zpool "altroot" property has been set), this change simply
compares the output of "zfs-get" from before and after "zfs-set" is
called

* update changelog format

* Update changelogs/fragments/2454-detect_zfs_changed.yml

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

* add note about check_mode

* Update plugins/modules/storage/zfs/zfs.py

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

* Update plugins/modules/storage/zfs/zfs.py

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

* clarify check mode qualifications

* rephrase to avoid hypothetical

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-10 17:55:19 +02:00
vbarba
4cdff8654a
fix stackpath_compute validate_config (#2448)
* fix stackpath_compute validate_config

get the lenght for the client_id / client_secret to validate inventory configuration

* Add changelog fragment.

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-09 22:25:00 +02:00
Mike Russell
7386326258
Small Documentation Example Of Cask Leveraging (#2462)
* Small Documentation Example Of Cask Leveraging

- Just a lil' demo showing that we can utilize homebrew/cask/foo syntax
for given name of package to grab associated cask pacakge

Resolves: patch/sml-doc-example-update

* Slight Documentation Example Edit

- adjusting documentation example to provide better info surrounding installing
a given formula from brew via cask

Resolves: patch/sml-doc-example-update

* Small Edits To Make PEP8 Happy

- format code with autopep8 in vs code

Resolves: patch/sml-doc-example-update

* Only Making Small PEP8 Change

- reverting previous mass PEP8 format, focus on trimming whitespace on
doc example entry

Resolves: patch/sml-doc-example-update

* Remove Trailing Whitespace PEP8

- removed trailing whitespace on doc example chunk

Resolves: patch/sml-doc-example-update
2021-05-08 11:58:55 +02:00
Felix Fontein
9906b9dbc7
Remove vendored ipaddress module. (#2441) 2021-05-05 12:31:01 +02:00
Jan Orel
aaa561163b
OpenNebula one_vm.py: Fix missing keys (#2435)
* OpenNebula one_vm.py: Fix missing keys

* fixup OpenNebula one_vm.py: Fix missing keys
2021-05-04 12:21:55 +02:00
zigaSRC
06bdabcad9
lvol - bug fix - Convert units to lowercase when using LVS or VGS command (#2369)
* Added lower call for units when checking lvs/vgs size

* Changelog

* Size roudning correction

* Rounding

* Changelog

* Remove whitespace
2021-05-03 21:25:52 +02:00
Alexei Znamensky
5064aa8ec6
linode_v4 - fixed error message (#2430)
* fixed error message

* added changelog fragment
2021-05-03 13:27:16 +02:00
Felix Fontein
6a72c3b338
Make plugins pass validation. (#2414) 2021-05-03 13:22:11 +02:00
Daniel-Sanchez-Fabregas
4b0d2dcfe0
📝 Document nested node addition with "_" in xml module (#2371)
* 📝 Document nested node addition with "_" in xml module

Nested node addition using "_" to indicate sub nodes, and attributes are only documented in tests and issues, where is hard to find.

* 🚨 Fix trailing space

* Apply suggestions from code review

Add missing collection prefix for modules.

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

* Add missing comments

* Update xml.py

* Fix linter warnings

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:42:58 +02:00
spike77453
7359b1fbe5
nmcli: Compare MAC addresses case insensitively (#2416)
* nmcli: Compare MAC addresses case insensitively

* Update changelogs/fragments/2416-nmcli_compare_mac_addresses_case_insensitively.yml

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

* Update plugins/modules/net_tools/nmcli.py

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

* Add mac to TESTCASE_BRIDGE so test_bridge_connection_unchanged covers case sensitive mac address comparison

* Update plugins/modules/net_tools/nmcli.py

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

* Convert current_value to uppercase as well in case nmcli changes behaviour

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:28:53 +02:00
spike77453
b5f8ae4320
nmcli: Add 'slave-type bridge' to nmcli command if type is bridge-slave (#2409) 2021-05-03 07:27:56 +02:00
Amin Vakil
26aba8e766
puppet - replace stdout with console in logdest option (#2407)
* Change stdout to console

* readd stdout, resulting in console

* add changelog

* readd stdout to docs and add a warning when it is used

* version of what???

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

* postpone deprecation in another PR

* remove console option, so it can be backported

* change changelog respectively

* Fix changelog formatting

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:26:47 +02:00
Daniel Werner
cd957fae4c
Fix #2373 - TypeError: a bytes-like object is required, not 'str' (#2375)
* Fix #2373

* Changelog fragment for #2373

* Update changelogs/fragments/2373-svr4pkg-fix-typeerror.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update changelogs/fragments/2373-svr4pkg-fix-typeerror.yml

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

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-03 07:25:08 +02:00
George Angelopoulos
eb455c69a2
composer: --no-interaction when discovering available options (#2348)
The composer module always uses the no-interaction option if it
discovers it _after_ calling "composer help ..." but not on the help
call itself. The lack of this option caused composer to not exit when
called through the ansible module.

The same example command when ran interactively does not prompt for user
interaction and exits immediately. It is therefore currently unknown why
the same command hangs when called through the ansible composer module
or even directly with the command module.

Example command which hangs:
php /usr/local/bin/composer help install --format=json
2021-05-01 18:23:14 +02:00
Xabier Napal
26c3bd25f6
influxdb_retention_policy: fix duration parsing to support INF values (#2396)
* influxdb_retention_policy: fix duration parsing to support INF values

* add changelog
2021-05-01 14:19:05 +02:00
Alexei Znamensky
48ef05def3
spotinst_aws_elastigroup - fixed elements for many lists (#2355)
* fixed elements for many lists

* added changelog fragment

* Removed verbose types in description - still missing formatting and properly documenting dicts
2021-04-27 13:18:29 +02:00
Frank Dornheim
2cc3ce0230
lxd: dynamic inventory (#2026)
* lxd dynamic inventory and test data

* added ``merge_profile`` parameter to merge configurations from the play to an existing profile

* cosmetic changes

* added ``merge_profile`` parameter to merge configurations from the play to an existing profile

* cosmetic changes

* fix pylint errors

* fix flake8 warnings

* fix pep8 errors without "line to long"

* fix ansible tests

* fix typo

* fix version added

* fix lost of suggestions from felixfontein

* fix filter
fix ansible test errors

* delete test config

* delete 'notes:' and copy content to description

* move testdata
load testdata by path from config

* updated documentation

* fix test data and remove inventory branch

* fix spellings and rename lxd to community.general.lxd

* fix documentation

* remove selftest

* strip example data

* add unit test

* switch to ansible.module_utils.common.dict_transformations

* documentation cleanup

* move lxd_inventory.atd from files to fixtures

* update documentation
move lxd_inventory.atd

* rename self.groups to self dispose
remove dumpdata

* cleanup

* fix unittests
comment out dump_data, it breaks the unit tests

* fix pep8

* Apply suggestions from code review

* Update plugins/inventory/lxd.py

* add test if no groupby is selected

* rename disposed to groupby
remove unused constant
other suggested cleanups

* Use bundled ipaddress instead of own code.

* Update plugins/inventory/lxd.py

* Exceptions should not be eaten.

* Improve error handling for network range/address parsing.

* Fix typo.

* Make network range valid.

* Do not error when groupby is not a dict.

Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 18:25:45 +02:00
Alexei Znamensky
99c564398a
jira - module revamp -> moved code to class (#2208)
* rebased after jira bugfix

* Update plugins/modules/web_infrastructure/jira.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 13:09:19 +02:00
zigaSRC
ffd73296de
lvol - extending volumes with '+' only work for percentages (#2267)
* Merged changes from old PR

* Added suppurt for -, other adaptations regarding size.

* Implementing +- support for -l

* Added changelog

* Renamed changelog

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-26 07:07:14 +02:00
Xabier Napal
aea12899cc
influxdb_retention_policy: ensure duration parameters are idempotent (#2281) (#2284)
* influxdb_retention_policy: ensure duration parameters are idempotent (#2281)

* add changelog for pr #2284
2021-04-26 07:03:36 +02:00
Gaetan2907
1b79440896
Fix incorrect URL_REALMS in keycloak.py (#2335)
* Allow keycloak_group.py to take token as parameter for the authentification

* Refactor get_token to pass module.params + Documentation

* Fix unit test and add new one for token as param

* Fix identation

* Update plugins/modules/identity/keycloak/keycloak_client.py

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

* Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

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

* Allow keycloak_group.py to take token as parameter for the authentification

* Refactor get_token to pass module.params + Documentation

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Check if base_url is None before to check format

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Switch to modern syntax for the documentation (e.g. community.general.keycloak_client)

* Fix URL_REALMS in keycloak.py

* Update keycloak_client.py

* Update keycloak_clienttemplate.py

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-04-26 07:01:43 +02:00
Felix Fontein
5195536bd8
Fix Python 2 compatibility issue. (#2340) 2021-04-26 06:56:21 +02:00
Alexei Znamensky
8ddb81a36f
jira - fixed base64 decode bug (#2349)
* fixed base64 decode bug

* added changelog fragment
2021-04-26 06:54:57 +02:00
Anubhav Chakraborty
f11f6595cc
convert string returned by plugin to unicode (#2329)
* convert string returned by plugin to unicode

* add changelog fragment

* fix changelog format

* fix changelog format yet again

Co-authored-by: Anubhav Chakraborty <anubchak@cisco.com>
2021-04-24 12:20:11 +02:00
TeamOSEOLA
fb1b756d48
Add plugin_paths parameter to terraform module. (#2308)
* Add plugin_paths parameter to terraform module.

The list `plugin_paths` is used in the init phase of terraform by setting
the `-plugin-dir` command line argument to a path that contains
terraform plugins. When the `-plugin-dir` argument is set, the plugin
discovery and auto-download of terraform is disabled. This is useful when
running terraform in automation environments for testing where the production
endpoints are strictly controlled or on air-gapped networks and you need
to control the versions of plugins available.

* Added `elements: path` to `plugin_paths` parameter documentation in terraform.py

* added changelog fragment

* Update changelogs/fragments/2308-terraform-add-plugin_paths-parameter.yaml

use double back-ticks vice single

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

* Update plugins/modules/cloud/misc/terraform.py

Add version added to documentation

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

* Update plugins/modules/cloud/misc/terraform.py

Add markup around URL in documentation

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

* Update plugins/modules/cloud/misc/terraform.py

remove `required=False` and `default=None` from module argument spec, as that is the default behavior and redundant

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Added directory structure info to documentation and examples sections.

* Update plugins/modules/cloud/misc/terraform.py

grammatical fix

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

* grammar fix to description.

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-04-21 16:05:37 -07:00
Dennis Israelsson
31c9ed0fe6
nmap: fix cache support (#2282)
* add cache support

* pep8 e501 fix

* revert verify_file function

* revert description update

* add changelog fragment

Co-authored-by: Dennis Israelsson <github@mdh.nu>
2021-04-21 16:00:03 -07:00
Ilija Matoski
ca48917b4f
inventory/proxmox: Added some cases for unsupported network interface and multi-nic and unsupported guest error (#2263)
* added some cases for unsupported network interface and multi-nic without IP addresses

* added changelog fragment

* lint fixes and added option for ansible_host setting

* added description about the new option

* lint fix too long line

* Update changelogs/fragments/2259-proxmox-multi-nic-and-unsupported.yml

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

* Update plugins/inventory/proxmox.py

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

* Update plugins/inventory/proxmox.py

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

* Update plugins/inventory/proxmox.py

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

* Added CommandDisabled

* refactored to code and added a test case where an interfaces doesnt have a mac address or is invalid to reset it to 00:00:00:00:00:00

* Update tests/unit/plugins/inventory/test_proxmox.py

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

* Update tests/unit/plugins/inventory/test_proxmox.py

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

* mac-address is set to None instead of 00:00:... when not defined

* changed None to empty string for mac-address

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-04-21 19:52:45 +02:00
Nick
8db59ff02d
with_filetree:: use splitext for compatibility with template: (#2285)
* with_filetree: use splitext for compatibility with template

The example code given deploys files with their .j2 extensions intact, which is probably not what you want.

* Explain how templates interact with splitext|first

* Update plugins/lookup/filetree.py

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

* Don't encourage setting the mode of symlinks

On ext4, maybe most filesystems, symlinks always have the artificial mode of 0777, and `chmod $mode $symlink` *writes through* the symlink to its target file.

An effect of this is that if you deploy a file and a symlink to it (e.g. this common situation: /etc/nginx/sites-available/default and /etc/nginx/sites-enabled/default -> ../sites-available/default) then `with_filetree` will forever first deploy the file with the right mode, then corrupt its mode to 0777, and every redeploy will see a change to fix, forever in a loop.

Probably `file:` should refuse `mode:` on `state: link`s, but in the meantime, avoid recommending it in `filetree`

* Use `follow: false` instead of just the mode.

This should be more cross-compatible.

https://github.com/ansible-collections/community.general/pull/2285#discussion_r616571873

* Update plugins/lookup/filetree.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-21 14:04:46 +02:00
Felix Fontein
c768060d95
More renames. (#2307) 2021-04-21 12:54:35 +02:00
Ajpantuso
68243063d1
pids module: Adding pattern and ignore_case options (#2280)
* Adding pattern and ignore_case options

* Adding changelog fragment

* Fixing changelog fragment

* Addressing FreeBSD 11.4/python 3 errors with explicit conversion

* Correcting descriptions

* Reverting back to regex input

* Fixing test syntax errors
2021-04-21 12:45:09 +02:00
kris2kris
cecbc2be2d
Keycloak: add realm management (#2155)
* Keycloak: add realm management

* Minor fixes

* Review fixes

* Remove sort of list because condition on list cannot be true

* Add exception in fail_json and update test

* Change output for secret and version in comments

* Update copyright

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

* Add missing traceback

* Apply suggestions from code review

* Update plugins/modules/identity/keycloak/keycloak_realm.py

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-21 12:42:28 +02:00
Gaetan2907
6ab9b05da3
Allow keycloak modules to take token as parameter for the auth. (#2250)
* Allow keycloak_group.py to take token as parameter for the authentification

* Fix some pep8 issues

* Add changelog fragment

* Refactor get_token to pass module.params + Documentation

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Fix unit test and add new one for token as param

* Fix identation

* Check base_url format also if token is given

* Update plugins/doc_fragments/keycloak.py

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

* Update plugins/modules/identity/keycloak/keycloak_client.py

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

* Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

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

* Allow keycloak_group.py to take token as parameter for the authentification

* Refactor get_token to pass module.params + Documentation

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update plugins/modules/identity/keycloak/keycloak_group.py

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

* Check if base_url is None before to check format

* Fix unit test: rename base_url parameter to auth_keycloak_url

* Update plugins/module_utils/identity/keycloak/keycloak.py

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

* Update changelogs/fragments/2250-allow-keycloak-modules-to-take-token-as-param.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update changelogs/fragments/2250-allow-keycloak-modules-to-take-token-as-param.yml

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/module_utils/identity/keycloak/keycloak.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_clienttemplate.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_group.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Update plugins/modules/identity/keycloak/keycloak_group.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Switch to modern syntax for the documentation (e.g. community.general.keycloak_client)

* Add check either creds or token as argument of all keyloak_* modules

* Update plugins/modules/identity/keycloak/keycloak_client.py

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Amin Vakil <info@aminvakil.com>
2021-04-20 13:20:46 +02:00
Gonéri Le Bouder
b10d707a8b
nmcli: manual overwrite MAC address for any devices (#2224)
* nmcli: manual overwrite MAC address for any devices

Don't restrict the ability to manually set the MAC address to the
bridge. NetworkManager is able to set a static MAC address to the
vaste majority of the device types.

* Update changelogs/fragments/2224_nmcli_allow_MAC_overwrite.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-19 19:02:48 +02:00
Alexei Znamensky
fbbd8ecd6f
Fixed validations in a couple of modules (#2268)
* fixed udm_dns_zone

* fixed udm_dns_record

* removed lines from ignore files

* added changelog fragment

* moved the list elements fix to minor_changes
2021-04-19 18:48:16 +02:00
quidame
f87a39b21d
new module: filesize - create or resize a file, given its size (#2232)
* new module: filesize

* description: create or resize a file, given its size
* with integration tests

* Update plugins/modules/files/filesize.py (version_added)

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

* Update filesize.py (extends_documentation_fragment: use fqcn)

Co-authored-by: Amin Vakil <info@aminvakil.com>

* doc: use strict lowercase booleans (true/false) rather than other variants

* use *raw* type to manage size values

* drop 'miB' unit family

* Apply suggestions from code review

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

* add more details

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-04-19 07:04:29 +02:00
Felix Fontein
91a0264f38
java_keystore: overwrite instead of fail when password or alias does not match (#2262)
* Overwrite instead of fail when password does not match.

* Update documentation.

* Fix tests.

* Update plugins/modules/system/java_keystore.py

Co-authored-by: Amin Vakil <info@aminvakil.com>

* Fix documentation.

* Apply suggestions from code review

Co-authored-by: quidame <quidame@poivron.org>

* Update tests/unit/plugins/modules/system/test_java_keystore.py

* One more.

Co-authored-by: Amin Vakil <info@aminvakil.com>
Co-authored-by: quidame <quidame@poivron.org>
2021-04-19 06:59:52 +02:00
Gonéri Le Bouder
6a8eb7b388
nmcli: add wifi support (#2220)
* nmcli: add wifi support

Ability to:

- connect NetworkManager to a Wifi network
- attach the connection to a master (bond).

* target 3.0.0
2021-04-18 10:59:23 +02:00