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

1158 commits

Author SHA1 Message Date
Victor Martinez
aa554c2887
opentelemetry: enrich services for jenkins, hetzner or jira (#4105)
* opentelemetry: enrich services for jenkins, hetzner, jira, zypper, chocolatey

* remove source and name for the time being

Those arguments can be later on in the future added, maybe with some opt-in feature, so let's only focus in the ones which are fully http based for now

* changelog fragment

* Update changelogs/fragments/4105-opentelemetry_plugin-enrich_jira_hetzner_jenkins_services.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-12 09:31:00 +01:00
thuttinpasseron
14b8cd9c64
[modules/cloud/misc/proxmox_kvm] Update docs for storage format option (#4186)
* Updated storage format documentation to point to PVE docs to show possible values

* Fixed trailing space
2022-02-12 09:22:03 +01:00
Pavol Babinčák‏
9567c99c9f
dconf: Skip processes that disappeared while we inspected them (#4153)
* dconf: Skip processes that disappeared while we inspected them

Fixes #4151

* Update changelogs/fragments/4151-dconf-catch-psutil-nosuchprocess.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-10 07:15:37 +01:00
Jean Raby
1580f3c2b4
request for comments - pacman: speed up most operations when working with a package list (#3907)
* pacman: rewrite with a cache to speed up execution

- Use a cache (or inventory) to speed up lookups of:
  - installed packages and groups
  - available packages and groups
  - upgradable packages
- Call pacman with the list of pkgs instead of one call per package (for
  installations, upgrades and removals)
- Use pacman [--sync|--upgrade] --print-format [...] to gather list of
  changes. Parsing that instead of the regular output of pacman, which
  is error prone and can be changed by user configuration.
  This can introduce a TOCTOU problem but unless something else calls
  pacman between the invocations, it shouldn't be a concern.
- Given the above, "check mode" code is within the function that would
  carry out the actual operation. This should make it harder for the
  check code and the "real code" to diverge.
- Support for specifying alternate package name formats is a bit more
  robust. pacman is used to extract the name of the package when the
  specified package is a file or a URL.
  The "<repo>/<pkgname>" format is also supported.

For "state: latest" with a list of ~35 pkgs, this module is about 5
times faster than the original.

* Let fail() actually work

* all unhappy paths now end up calling fail()

* Update copyright

* Argument changes

update_cache_extra_args handled as a list like the others
moved the module setup to its own function for easier testing
update and upgrade have no defaults (None) to let required_one_of() do
its job properly

* update_cache exit path

Shift successful exit without name or upgrade under "update_cache".

It is an error if name or upgrade isn't specified and update_cache wasn't specified
either. (Caught by ansiblemodule required_one_of but still)

* Add pkgs to output on success only

Also align both format, only pkg name for now

* Multiple fixes

Move VersionTuple to top level for import from tests
Add removed pkgs to the exit json when removing packages
fixup list of upgraded pkgs reported on upgrades (was tuple of list for
no reason)
use list idiom for upgrades, like the rest
drop unused expand_package_groups function
skip empty lines when building inventory

* pacman: add tests

* python 2.x compat + pep8

* python 2.x some more

* Fix failure when pacman emits warnings

Add tests covering that failure case

* typo

* Whitespace

black failed me...

* Adjust documentation to fit implicit defaults

* fix test failures on older pythons

* remove file not intended for commit

* Test exception str with e.match

* Build inventory after cache update + adjust tests

* Apply suggestions from code review

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

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

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

* changelog

* bump copyright year and add my name to authors

* Update changelogs/fragments/3907-pacman-speedup.yml

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

* maintainer entry

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-08 22:46:00 +01:00
Joseph Torcasso
acd8853242
vdo: Remove unused variable (#4163)
* fix vdo error #3916

* add changelog fragment
2022-02-07 20:12:44 +01:00
Markus Reiter
a61bdbadd5
Refactor all Proxmox modules to use shared module_utils. (#4029)
* Refactor Proxmox modules to use `module_utils`.

* Fix tests.

* Rename `node_check`.

* Add `ignore_missing` to `get_vm`.

* Refactor `proxmox` module.

* Add changelog entry.

* Add `choose_first_if_multiple` parameter for deprecation.
2022-02-07 06:21:24 +01:00
IronTooch
c09f529f02
Update Proxmox Inventory Documentation with additional examples (#4148)
* Update Documentation with additional example

* Added an example to have the plugin return an IP address for a Proxmox guest, instead of the name of the guest (default behavior)
* Added an example to include a string literal to every guest (to support a playbook being able to check for variable presence to identify inventory in use)

* Update for line length readability

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

* Changed to cleaner static value

* Changed text for clarity

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-05 21:16:07 +01:00
Markus Bergholz
69551ac325
gitlab_project_variable: Allow delete without value (#4150)
* value is not required when state is absent

* fix integration test. missing value

* fix condition

* add changelog fragment

* fail fast

* try required_if on suboptions

* revert

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* fix naming in doc

* typo in name

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-02-05 21:02:04 +01:00
Felix Fontein
9322809b3a
Fix return value documentation to use a valid value for 'type'. (#4142) 2022-02-02 20:58:27 +00:00
Joseph Torcasso
8b95c56030
homebrew_cask: reinstall when force is install option (#4090)
* homebrew_cask: reinstall when force is install option

* add changelog entry

* Fix OSX CI runs - run as non-root

* test with cask that has no macos dependencies

* use `brooklyn` cask to test
2022-02-02 21:31:05 +01:00
Felix Fontein
e09254df91
mail callback: fully use Ansible's option handling; deprecate not specifying sender (#4140)
* Fully use Ansible's option handling. Deprecate not specifying sender.

* Update plugins/callback/mail.py

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

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-02-01 10:12:03 +01:00
Markus Bergholz
33a65ae20f
Fix and rework gitlab_project_variable (#4038)
* rework-and-fix

* fix delete bug and change report

* delete the requested variables based on env scope

* fix absent logic when not purge: remove what is requested

* change code to current behaviour

* complete implementation

* fix delete

* restore origin return structure

* reorder

* add test for origin bug

* add changelog fragment

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* remove yaml

* apply suggestions

* readd accidental removed line

* improve the truth of return value 'project_variable' in check mode

* fix pep8, over-indented

* fix typos and add subelement options

* Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml

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

* Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* Update plugins/modules/source_control/gitlab/gitlab_project_variable.py

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

* remove diff feature

* resolve all recommentdations

* resolve change requests, improve doc and remove default value before compare, because values always exists (prebuild)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 20:00:37 +01:00
Nedelin Petkov
969ad475e3
Added new feature for ansible_user and ansible_port in Icinga2 inventory source (#4088)
* Added new feature for ansible_user and ansible_port

* Replaced 'try' and 'except' with 'if' condition

* Replace '!=' with 'is not'

* Fixed if condition

* Implement the constructed interface

* Correction at the suggestion of felixfontein

* Added new options in unit test for icinga2 inventory

* Added blank lines in unit test for icinga2 inventory

* Added default filter in example

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

* Fixed variable name in example

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

* Added a changelog fragment

* Fixed changelog fragment

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

* Updated documentation options

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 19:50:08 +01:00
LucasBoisserie
5710faab64
Add profile parameter for scaleway inventory (#4049)
* add profile parameter for scaleway inventory

* Update doc from review and add changelog

* Update changelogs from review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 19:33:35 +01:00
gaetan-craft
6a7811f696
Fix local port regex in listen_ports_facts (#4092)
* Fix local port regex

Thsi PR fix the bug reported in #4091

* Update changelogs/fragments/4092-fix_local_ports_regex_listen_ports_facts.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-31 19:33:11 +01:00
Seena Fallah
929136808f
gitlab: use gitlab instance runner to create runner (#3965)
When using project it will use project level runner to create runner that based on python-gitlab it will be used for enabling runner and needs a runner_id so for creating a new runner it should use gitlab level runner

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2022-01-31 05:58:00 +01:00
Orion Poplawski
0dd886bac8
[inventory/cobbler] Add include_profiles option (#4068)
* [inventory/cobbler] Add exclude/include_profile option

Also some minor cleanup

* Review suggestions

* Still must init cache_key

* Add note to exclude_profiles about include_profiles

* Add changelog fragment
2022-01-31 05:57:09 +01:00
Will Hegedus
f77a1114fb
linode: Allow templating token for dynamic inventory (#4040)
* linode: Allow templating token for dynamic inventory

Template the value for the access_token if it's a Jinja template.

Allows for looking up tokens from files or pulling from secrets stores like Vault.

* add Linode changelog fragment

* Fix lookup example for newer versions of Ansible

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

* Rename test case for clarity

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-30 22:16:59 +01:00
Will Hegedus
526369a243
python_requirements_info: don't overwrite results in 'mismatched' dict key (#4078)
* bugfix: don't overwrite results in 'mismatched'

Whichever mismatched package is evaluated last is the value stored in the
'mismatched' key. Instead, it should have a subdict for each pkg that is mismatched
to keep in line with its documented usage.

* Update changelogs/fragments/4078-python_requirements_info.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-29 15:30:07 +01:00
Victor Martinez
e793e2e94f
opentelemetry: enrich service for community.docker.docker_login (#4104)
* opentelemetry: support service for community.docker.docker_login

* changelog
2022-01-29 15:13:36 +01:00
Vladimir Botka
71fb3984db
Add options to filter lists_mergeby (#4058)
* Update filter lists_mergeby #4057

* Added options 'recursive' and 'list_merge'. The functionality of the
  added options is the same as in the filter 'combine'.
* Allow the user to do [list1, list2, ...]|lists_mergeby('index')
* Use the function merge_hash from ansible.utils.vars

* Add merge_hash_wrapper to test Ansible version

* Enable Ansible 2.9 and lower versions with default options of
  lists_mergeby only.
* Non-default options of lists_mergeby trigger error in 2.9 and lower
  versions.
* Update messages and tests.

* Fix tests.

* Use LooseVersion instead of SpecifierSet.

* Update docs 'Filter Guide' section 'Merging lists of dictionaries'.

* Added changelog fragment.

* Update changelogs/fragments/4058-lists_mergeby-add-parameters.yml

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/filter_guide.rst

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

* Added examples; moved to rst/examples; fixes.

* Improve error message testing sequence.

* Removed .yamllint

* Update docs/docsite/rst/examples/lists_mergeby/example-003.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/example-004.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/example-005.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/example-006.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/example-007.yml

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/filter_guide.rst

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

* Update tests/integration/targets/filter_list/tasks/lists_mergeby_default.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/example-008.yml

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

* Fix docs. Antsibull only copies .rst files.

* Fix examples in-line.

* Update docs/docsite/rst/filter_guide.rst

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

* Update docs/docsite/rst/examples/lists_mergeby/examples.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/examples.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/examples.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/examples.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/examples.yml

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

* Update docs/docsite/rst/examples/lists_mergeby/examples.yml

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

* Update docs lists_mergeby. Remove rubbish.

* Emphasized labes of examples in filter_guide.rst
* Removed temporary file examples/lists_mergeby/examples.rst
* Removed tests/integration/targets/filter_list/runme.*

* Fix docs. Description of the lists_merge options.

* Move helper files out of rst/ directory.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-28 08:19:19 +01:00
jack1142
7ca60e0177
Actually expand ~ in yarn global install folder (#4048)
* Fix 'changed' status for yarn global by actually expanding ~

* Ignore use-argspec-type-path test

* Add changelog fragment

* Update changelogs/fragments/4048-expand-tilde-in-yarn-global-install-folder.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-28 07:17:06 +01:00
jack1142
4309dfda52
Properly parse JSON Lines output from yarn (#4050)
* Properly parse JSON Lines output from yarn

* Properly support output of yarn global list

* Add changelog fragment

* Check that the string starts with 'bins-'

* Fix changelog fragment

* Update changelogs/fragments/4050-properly-parse-json-lines-output-from-yarn.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-28 07:13:08 +01:00
James Livulpi
ab7e4ee578
New Module: Homectl module for managing systemd-homed (#4018)
* initial development of homectl module

* botmeta

* fix some linting

* Update .github/BOTMETA.yml

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* use array form of run_command

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

* Update plugins/modules/system/homectl.py

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

* added mofifying user record and cleaned up based on comments

* added updating records/multiple changes regarding options, examples doc, return doc

* add integration tests and more overall improvements

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* Update plugins/modules/system/homectl.py

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

* removed modify handle within present

* adding more options and better checking of user records when updating

* Apply suggestions from code review

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

* Update plugins/modules/system/homectl.py

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

* Add code review changes

- remove unsafe_shell with run_command.
- use dict.pop() in user_metadata dict.
- consistent quoting to single quotes.
- change logic to determine check mode better
- fix integration tests and added check_mode tests

* Fix handling of mount opts

When a user is created without mountopts homed will use nodev and nosuid
by default, however the user record metadata will not contain these
values. This commit takes extra care that correct value is being set to
true or false. So if a user gives mountopts with just nodev we need to
make sure the nosuid and noexec gets set to false, etc. If mountopts are
same as currently in user record make sure nothing would be changed and
outputs correctly.

Also fixed some tests.

* change fmethod modify_user to prepare_modify_user_command

* Code review fixes and add existing user pw checking

- Added methods to check existing users password is correct by comparing
  the hash stored in homed user record and the hash of given password
- Updated integration tests for above case
- Added aliases file so CI can run

* Apply suggestions from code review

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-28 07:11:12 +01:00
tman5
7aab4497ac
Adding while loop to wait for cluster container creation (#4039)
* Adding while loop to wait

* Adding changelog fragment

* Adding parameter and more docs

* Adjusting docs

Co-authored-by: Travis Scotto <tscotto@webstaurantstore.com>
2022-01-28 07:08:52 +01:00
Felix Fontein
5fead8bbde
Fix missing '>'. (#4080) 2022-01-25 07:50:11 +01:00
Gerben Welter
a4983ce38a
one_vm: add release action (#4036)
* one_vm: add release action

Previously you could create VMs with the `vm_start_on_hold` parameter
but then ansible couldn't release the VMs so they would be scheduled to
run. This PR adds the ability to release VMs which are in the 'HOLD'
state.

* Add changelog fragment

* Update changelogs/fragments/4036-onevm-add-release-action.yaml

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

* Update plugins/modules/cloud/opennebula/one_vm.py

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

* Make releasing a VM part of the running state

When `state: running` is specified the code checks if the VM is in a
'HOLD' state and will release the VM when needed.

Co-authored-by: Gerben Welter <gerben.welter@hcs-company.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-24 19:52:32 +01:00
Felix Fontein
62d519de10 Fix version_added. 2022-01-24 06:41:41 +01:00
marcus67
12c0220c59
Add option "options" to snap module (#3943)
* Add functionality proposed in https://github.com/ansible-collections/community.general/issues/666

* Fix pylint errors mentioned in CI pipeline

* Fix pylint errors mentioned in CI pipeline (continued)

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

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

* Apply suggestions from code review

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

* Added tests
Fixed error occurring when called without options
Added changelog snippet

* Remove changelog entry as suggested in review

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

* Apply suggestions from code review

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

* rewrite `if len(overall_options_changed) > 0` in a more Pythonic way
un-indent `if len(overall_options_changed) > 0` to only be executed after the options of all snaps have been checked

* better placement of local variable `overall_options_changed`

* Re-arrange code to reduce indentation level (suggested by reviewer)

* Re-arrange code to reduce indentation level (suggested by reviewer, continued)

* Re-arrange code to reduce indentation level (suggested by reviewer, continued)
Raise exception if option map returned by `snap set` contains list container (suggested by reviewer)
Handle Python2 type `long` correctly (suggested by reviewer)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-24 06:39:37 +01:00
Trey West
f954539795
Add nmcli support for IPv6 routes (#4062) 2022-01-23 13:02:03 +01:00
Lénaïc Huard
750d96a95f
mail: add Date and Message-ID headers (#4056) 2022-01-21 07:27:20 +01:00
Lénaïc Huard
c7500c217f
Fix exception in the mail callback plugin (#4026) 2022-01-20 08:31:09 +01:00
jack1142
c18fdb43d7
Fix detection of installed cargo packages with hyphens in name (#4052)
* Fix detection of installed cargo packages with hyphens in name

* Add changelog fragment

* Fix outdated package detection

* Add changelog fragment for af4fae72

* One more thing

* Add idempotency tests
2022-01-18 12:12:48 +01:00
NixM0nk3y
5540dab382
opentelemetry: no_log:true causes exception when generating trace (#4043)
* dont check for urls when args is None

* add changelog fragment

* fix lint on changelog fragment

Co-authored-by: Nick Gregory <nick.gregory@openenterprise.co.uk>
2022-01-17 18:50:19 +01:00
Samori Gorse
20d09a4ae6
Update example (#4041)
The `simple_config_file` was confusing and doesn't work if you copy paste it.
2022-01-16 20:31:24 +01:00
Markus Reiter
761fbe4fa3
Move Proxmox HAS_PROXMOXER check into module_utils. (#4030)
* Move Proxmox `HAS_PROXMOXER` check into `module_utils`.

* Fix tests.

* Fix typo.

* Update changelog entry.
2022-01-16 20:13:47 +01:00
Fynnnnn
1214d42472
New Module: Keycloak Realm Info (#3998)
* feat(plugins/keycloak): add get_realm_info_by_id as util function

* feat(plugins/keycloak): add keycloak_realm_info module

* chore: add maintainer

* feat(plugins/keycloak): remove supports_check_mode

* feat(plugins/keycloak): add supports_check_mode back

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

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

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

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

* docs(plugins/keycloak): cleanup docs

* feat(plugins/keycloak): add unit test

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

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

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

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

* feat(plugins/keycloak): remove end_state

* docs(plugins/keycloak): complete sentences

* docs(plugins/keycloak): use dict for return type

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-11 06:42:47 +01:00
Guillaume Rousse
a675afcba9
fix alternatives parsing when they are part of a group (#3976)
* fix alternatives parsing when they are part of a group

* add changelog fragment

Co-authored-by: Guillaume Rousse <guillaume.rousse@renater.fr>
2022-01-10 07:10:22 +01:00
Benoit Vaudel
fe57cd5ac8
puppet: Add documentation and remove deprecation for show_diff, keep deprecation for alias show-diff (#3980)
* puppet: Add documentation and remove deprecation for show_diff

* Add changelog fragment

* Update changelogs/fragments/3980-puppet-show_diff.yml

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

* Update plugins/modules/system/puppet.py

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

* Update plugins/modules/system/puppet.py

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

* Fixing syntax error introduced in 29298da3

* More documentation for show_diff and fix some sanity errors

* Update changelogs/fragments/3980-puppet-show_diff.yml

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

* Update tests/sanity/ignore-2.10.txt

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

* Add validate-modules:parameter-invalid to ignores due to invalid and depricated alias

* Keep use-argspec-type-path in ignores

* Update plugins/modules/system/puppet.py

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

Co-authored-by: Benoit Vaudel <benoit@catalyst.net.nz>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-10 07:08:17 +01:00
Lee Garrett
d19ab93faf
Fix example code for flattened lookup (#4013)
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
2022-01-09 11:11:56 +01:00
Felix Fontein
29e8f5f8cf
Unvendor distutils.version (#3988)
* Unvendor distutils.version.

* Document breaking change.
2022-01-08 21:45:02 +01:00
mizumm
ebc0ef882a
ipmi_power: Add machine option to ensure the power state via the remote target address (#3968)
* ipmi_power: Add machine option to ensure the power state via the remote target address

* Fix yamllint sanity check error

* Add changelog fragment entry

* Apply suggestions from the code review

* update to apply suggestions

* Add version_added.

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-08 16:03:51 +01:00
radek-sprta
7c21a27c5d
New module for cargo command (#3712)
* New module for cargo command

* Resolve CI errors

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

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

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

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

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

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

* Add maintainer

* Change installed_packages from property to function

* Allow cargo to install list of of packages

* Remove period at the end of task names

* Pass only the list of packages to take action on to cargo

* Add integration tests for cargo

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

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

* Apply suggestions from code review

* Update tests/integration/targets/cargo/tasks/setup.yml

* Update tests/integration/targets/cargo/tasks/setup.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-08 15:40:13 +01:00
Johan Wennerberg
4ea58fba75
nmcli: Add wireguard connection type support (#3985)
* nmcli: add wireguard connection type

* nmcli: fix wireguard unit tests

* nmcli: set ipv4.method to disabled if ip4 not set

Method 'auto' is not supported for WireGuard

* nmcli: add wireguard documentation

* nmcli: clean up wireguard documentation

* nmcli: add wireguard changelog fragment

* nmcli: fix wireguard documentation

* Apply suggestions from code review

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

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
2022-01-08 14:13:50 +01:00
Felix Fontein
a6a8cd02b6
Fix comment. (#3993) 2022-01-06 12:56:16 +00:00
Martijn
b0c27f7a68
proxmox: Add clone parameter (#3930)
* proxmox: Add clone parameter

* Add changelog fragment

* Add version_added

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

* Add PR URL to changelog fragment

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

* Clarify what content_check does

* Split up try/except block to give a separate error message when creation pre-checks fail

* Create seperate case for cloning

* Prevent 'clone' argument from being removed

* Fix double argument, add todo's

* Check if to be cloned container actually exists

* Adjust module options dependencies

* Require 'storage' parameter when cloned container is not a template and ignore otherwise

* Don't only create linked clones of template containers

* Fix pylint errors

* Add extra example

* Minor language fix

* Add clone_type parameter to specify cloning behaviour

* I can't find if openvz nodes have this clone API, so just don't support it

* Remove unrelated changes

* Don't pass unused kwargs

* Revert more unrelated changes

* Remove required_together clone and clone_type because clone_type has a default choice

* Fix clone_type reference

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

* Fix missing period

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

* Fix redundant period

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

* Fix redundant period

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-06 07:01:25 +01:00
Felix Fontein
11205eefee
Fix BOTMETA and corresponding sanity test (#3989)
* Fix BOTMETA and authors mistakes.

* Fix BOTMETA sanity test regex.
2022-01-05 22:54:21 +01:00
Felix Fontein
cf7a33356c
Use vendored copy of distutils.version. (#3984) 2022-01-05 21:19:49 +01:00
xilmen
125516b957
[Bug] Scaleway The volume is created systematically on par1 (#3964)
* [Bug] The volume is created systematically on par1

* add change log

* added backward compatibility with organization

* add documentation

* change typo doc

* Update changelogs/fragments/3964-scaleway_volume_add_region.yml

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

* Update plugins/modules/cloud/scaleway/scaleway_volume.py

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

* Update plugins/modules/cloud/scaleway/scaleway_volume.py

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

* Update plugins/modules/cloud/scaleway/scaleway_volume.py

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

* Update plugins/modules/cloud/scaleway/scaleway_volume.py

Co-authored-by: Rémy Léone <remy.leone@gmail.com>

* optimization

Co-authored-by: Romain SCHARFF <rscharff@plussimple.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Rémy Léone <remy.leone@gmail.com>
2022-01-05 17:53:00 +01:00
Jon
1ba79f3c6a
Sudoers (take 2) (#3746)
* Add module and pass the andebox validate-modules

* Fixes pep8 and sanity checks

* Add tests (intending that they'll fail)

* Fix pep8 complaint

* Remove stub test_sudoers file

* Add version_added to documentation

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

* Various improvements as suggested by reviewers

* Remove further required: false from documentation

* Make yaml indentation consistently indented

* Remove default for command argument

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

* Refactor check_mode checking as guards

* Update documentation formatting and use to_native

* Update plugins/modules/system/sudoers.py

* Update examples and formatting

* Fix merge conflict

* Update handle

* Add some integration tests

* Update tests to pass yamllint

* Fix assertions typo

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

* Remove wrapping quotes from assertions

* Use >- for long example names

* Add aliases file to sudoers integration tests

* Fix integration test name

* Create new alternative sudoers directory in case /tmp doesn't exist

* Alternative assertion test for checking rule revocation

* Re-quote assertions

* Update version_added to 4.3.0

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

* Uppercase first character of short_description

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

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-05 08:30:44 +13:00