* Add support to restrict privileges by host
* Missing comma
* Making linter happy.
* Add version 6.2.0 as when sudoers host parameter added
Co-authored-by: Felix Fontein <felix@fontein.de>
* Changelog fragment for PR #5703
* Test for sudoers host-based restriction
Co-authored-by: Felix Fontein <felix@fontein.de>
* opkg: fix issue that force=reinstall would not reinstall an existing package
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
* changelog fragment
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
lxc_container fails when executing the lxc command (e.g. when creating
a new container) because PR#5358 broke the module argument
parsing. The resulting argument dict contained only the module argument name
and the argument flag but not the value. E.g.
```
- lxc_container:
template: debian
```
would result in lxc command arguments `lxc template --template` instead of
`lxc --template debian`.
Fixes: 6f88426cf1 ("lxc_container: minor refactor (#5358)")
Fixes#5578
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* draft
* add changelog fragment
* rework
* rework group variables
* add new line at end of file
* Update plugins/module_utils/gitlab.py
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
* rename
* revert
* return a copy
* Update plugins/modules/gitlab_project_variable.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Add the `server_proxy_scheme` parameter to configure the scheme used for
the proxy server. This completes the configuration parameters for the
proxy server.
* Keycloak: Fix client rolemapping removal
Keycloak's delete_group_rolemapping API wrapper didn't pass data about
the roles to remove to keycloak, resulting in removal of all roles.
Follow the intended behaviour and delete only the roles listed in the
module invocation.
Signed-off-by: Florian Achleitner <flo@fopen.at>
* Keycloak: Fix client_rolemapping diff
The module's diff output wrongly showed the changed roles list as
'after' state. This is obviously wrong for role removal and also
wrong for role addition, if there are other roles assigned.
Use the result of the API query for 'end_state' for 'diff' as well.
Signed-off-by: Florian Achleitner <flo@fopen.at>
* Keycloak: Calculate client_rolemapping proposed state properly
Signed-off-by: Florian Achleitner <flo@fopen.at>
* Add changelog fragment
Signed-off-by: Florian Achleitner <flo@fopen.at>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix for python2 unit test
Signed-off-by: Florian Achleitner <flo@fopen.at>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updated tags delimiter
Starting from Proxmox 7.3 tags are delimited by semicolon. For backward compatibility it needs to be splitted by both commas and semicolons.
* Added missing space
* Add changelog fragment.
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix typo disable_looups in inventory/proxmox
- resolve issue with lookups in proxmox inventory config
* add changelog fragment
* Update changelogs/fragments/5640-fix-typo-proxmox-inventory.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add regex to match all channel ids
* Add changelog fragment
* Allow matching of channel ids with 9-11 characters
* Fix file name
* Update changelogs/fragments/5629-add-channel-prefix-regex.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove channel auto prepend #
* Update changelog fragment
* Add prepend_hash option
* Add version_added to prepend_hash doc string
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add description of possible values for the prepend_hash option
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove old channel assign statement
* Update changelogs/fragments/5629-add-prepend-hash-option-for-channel-id.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelog fragment tag
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* vdo: Use yaml.safe_load() instead of yaml.load()
yaml.load() without specifying a Loader= is deprecated and unsafe.
For details, see
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
* Update changelogs/fragments/5632-vdo-Use-yaml-safe-load-instead-of-yaml-load.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Lee Garrett <lgarrett@rocketjump.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix for vmadm get_vm_uuid out of range
* Fix for vmadm get_vm_uuid out of range
* Update changelogs/fragments/5628-fix-vmadm-off-by-one.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Fixes#3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.
Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.
Co-authored-by: Thor K. H <thor@roht.no>
Stop passing all the "rhsm_", and "server_" module arguments to
"Rhsm.register()", and thus as arguments for
"subscription-manager register":
- right before calling "Rhsm.register()", "Rhsm.configure()" is called
to configure subscription-manager with all the "rhsm_", and "server_"
arguments; hence, they are already configured
- the passed argument to "--serverurl" is partially wrong:
"Rhsm.register()" passes only the hostname, whereas the other bits
(port and prefix) are supported too; this "works" because port and
prefix were already configured previously, and the lax parsing that
subscription-manager does allows for missing bits
- the parsing done by subscription-manager for "--baseurl" strips out
the URL scheme and always uses https: this means that specifying
"rhsm_baseurl: http://server" as module parameter will be taken as
"https://server" by subscription-manager; since "rhsm_baseurl" is
already configured by "Rhsm.configure()", this issue is gone
* unixy Callback: Use Ansible's config manager
In ansible-core 2.14 deprecated support was removed[1] for accessing options
of the DefaultCallback via class attributes. Use the "new" config system
instead.
[1]: dbdbfe845aFixes#5600.
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
* Update changelog fragment.
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
* java_certs : Not enough info on error
Just bumped into an issue when the message was "Internal module failure, cannot extract public certificate from pkcs12, error: "
Seems that the issue #2560 doesn't cover all cases. To make debugging easier, I propose to add error output on json return instead of only expose standard output.
* java_certs - add missing fragment message
* Word-smithing.
Co-authored-by: Felix Fontein <felix@fontein.de>
* Redfish: Expanded SimpleUpdate command to allow for users to monitor the progress of an update and perform follow-up operations
* Update changelogs/fragments/3910-redfish-add-operation-apply-time-to-simple-update.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/redfish_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/4276-redfish-command-updates-for-full-simple-update-workflow.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updated based on feedback and CI results
* Update plugins/modules/redfish_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/redfish_command.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/redfish_info.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* cmd_runner module utils: fix case for as_fixed() format
* add changelog fragment
* simplified test_cmd_runner
* fix handling empty default for `as_map()`
* add changelog fragment
* MissingArgumentValue is reraised in run()
* Fix the logical flaw when deleting a build in the jenkins_build module.
* Fix the logical flaw when deleting a Jenkins build in the jenkins_build module.
* Adding changelogs.
* Update tests/unit/plugins/modules/test_jenkins_build.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Attempt to mock the exception classes.
* Remedy the CI issues when mocking the exception classes.
* Assuming a way to mock the get_build_status function.
* Near to the feasible approach.
* Calls the correct class when unit testing.
* Fix sending wrong arguments when unit testing.
* Directly assign the argument value in the unit testing.
* Fix errors calling different classes.
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix for 'NoneType' object has no attribute 'split'
* Added changelog to fix
* Update changelogs/fragments/5489-nonetype-in-get-vm-by-label.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix line ending in changelog
Co-authored-by: Felix Fontein <felix@fontein.de>
* mksysb: using CmdRunner
* add changelog fragment
* adjust code when check_mode true
* Update plugins/modules/mksysb.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Begin building out separate classes to support different op cli versions
Create separet base classes for each major version.
Define the main interface in the base class.
Create methods for getting the current version and instantiating the
appropriate class based on the found version.
* First pass at mostly working CLI version classes
* Correct mismathched parameters
* Update _run() method to allow updating enviroment
This allows passing in the app secret as an env var, which is more
secure than using a command line arg.
* Continuing to improve the interface
* Tear existing tests down to the studs
These tests were based off of the LastPass unit tests. I’m going to
just start from scratch given the new plugin code is vastly diffenent.
* Fix sanity test
* CLI config file path can be None
* Improve required param checking
- only report missing params
- use proper grammer based on number of missing params
* Change assert_logged_in() method return value
Return a boolean value indicating whether or not account is signed in
* Improve full login for v2
Have to do a bit of a dance to avoid hitting the interactive prompt
if there are no accounts configured.
* Remove unused methods
* Add some tests
* Fix linting errors
* Move fixtures to separate file
* Restructure mock test data and add more tests
* Add boilerplate
* Add test scenario for op v2 and increase coverage
* Fix up copyright statements
* Test v1 and v2 in all cases
* Use a more descriptive variable name
* Use docstrings rather than pass in abstract class
This adds coverage to abstract methods with the least amount of hackery.
* Increase test coverage for CLI classes
* Sort test parameters to avoid collection errors
* Update version tested in docs
* Revere test parameter sorting for now
The parameters need to be sorted to avoid the issue in older Python
versions in CI, but I’m having trouble working out how to do that
currently.
* Allow passing kwargs to the lookup module under test
* Favor label over id for v2 when looking for values
Add tests
* Display a warning for section on op v2 or greater
There is no “value” in section fields. If we wanted to support sections
in v2, we would also have to allow specifying the field name in
order to override “value”.
* Move test cases to their own file
Getting a bit unwieldy having it in the test file
* Move output into JSON files fore easier reuse
* Switch to using get_options()
* Add licenses for fixture files
* Use get_option() since get_options() was added in Ansible Core 2.12
* Rearrange fixtures
* Add changelog
* Move common classes to module_utils
* Move common classes back to lookup
The plugin relies on AnsibleLookupError() quite a bit which is not available
in module code.
Remove use of display for errors since section isn’t actually deprecated.
* Properly handle sections
Still room for improvement, but this is at least a start.
* Remove some comments that won’t be addressed
* Make test gathering more deterministic to avoid failures
* Update changelog fragment
* Simple fix for making tests reliable
* Allow for DN's to have {x} prefix on first RDN
* Update changelogs/fragments/5450-allow-for-xordered-dns.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Assign attrs to throw-away var
* Update plugins/module_utils/ldap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Escape DN before creating filter
Co-authored-by: Felix Fontein <felix@fontein.de>