* portage: drop dependency on gentoolkit (provides equery)
Portage installs a Python module, which is available anywhere that
Portage itself is available. We can use that instead of calling a
shell command.
Signed-off-by: John Helmert III <ajak@gentoo.org>
* portage: add knob for emerge's --backtrack flag
Signed-off-by: John Helmert III <ajak@gentoo.org>
* portage: add knob for portage's --with-bdeps option
Also, this option does not accept "True" like other options. Instead,
it only uses 'y' and 'n', so parse booleans properly into these chars.
Signed-off-by: John Helmert III <ajak@gentoo.org>
* Add changelog entry for #5349
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: John Helmert III <ajak@gentoo.org>
* updated to use the new newrelic v2 api
* check that application_id is set
* indenting issue
* added back app_name
* fix import ordering
* resolving various spellings & wordings
* fixed wordings
* validate_certs
* fixed unreachable code
* opentelemetry: logs property
* opentelemetry: support for span events with the Task dump output
* opentelemetry: support property to disable the logs
* bump the version when supported
* add section ini
* test: fix change of signature
* [opentelemetry][callback] changelog fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Experimental change from OpenIndiana
* resolve pfexec problem, by removing superfluous quotes
* reimplement "wrap_exe"
* remove spaces arround keyword argument assignment
* adapted pfexec unit test
* Try to fix quoting of test expression
* Fix quoting of test expression by replacing ' with "
* Add changelog fragment
* Adding capability to specify complex variables type to terraform
* Terrform variable types are mapped to ansible veriable types
* Currently handles Dict, List, Str, Int, Bool types
* Updated the documentation accordingly
* Updated with an example.
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Wonder how that missed the PEP8 checks :).
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding the changelog fragment
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding ``integer_types`` from ``module_utils``
Simplified the ``integer_types``, ``str`` and ``float`` value population through ``json.dumps()``. Now the strings can have special characters which can break the module execution.
* Update changelogs/fragments/4797-terraform-complex-variables.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* * Changed to approach to make the code more readble and simple to understand.
* Maintaining the original for loop for the top_level variables. Therefore the rocess_conplex_args() now only handle second level variables when the type() is either Dict or List.
* Json dumps are used only for the low level variables. Terraform CLI had issues interpreting escape sequecences from json.dumps()
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* adding boolean explicitly, although boolean is a subclass of integer, adding this for self documentation pupose and the clarity of the code.
* fixing the doc strings
* Update terraform.py
Fixing docstrings
* * Introducing format_args funtion to simplify formatting each argument type for top_level and lower level.
* Terraform Lists of strings, numbers, objects and lists are supported.
* Adding COMMAND: to the fail_json msg, for plan failures to help troubleshoot command line arguments.
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* * Adding full terraform command to fail_json() when the terrafor plan fails
* Fixing a spelling mistake.
* plan_command if a list, stringifying the list
* * Fixing the new line for the change fragments
* Removed CR (\r) from the output messages. Now output lines carry only LF (\n), not CRLF (\r\n).
* Added integration testing for complex variables.
* Restructured integration testing code to be more expandable.
* Update changelogs/fragments/4797-terraform-complex-variables.yml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* double-quotes are not properly escaped in shell, and python string
escaping are nullified the way terraform handle second tier string
variables (within terraform).
* changing all the task actions to FQCN format.
* integration testing now includes:
1. Top level strings containing, special shell characters, spaces,
double-quotes.
2. Second level strings containing, special shell characters, spaces,
double-quotes repeating double-quotes to ensure proper regex
substitution.
* Adding colon ':' to string test casses.
* Added complex_vars to switch between the old and the new variable
interpretations.
Updated the documentations to reflect the changes.
Updated the examples.
Handling '\' as well with the escape sequence.
* Added tests for the new escape sequences.
Added multilines tests.
* Restructuring the documente strings to a shorter string.
Argument_spec changed to 'bool'
* Update changelogs/fragments/4797-terraform-complex-variables.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/misc/terraform.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This fix ensures the idempotency of the redhat_subscription module when pool_ids are used. The main problem was, that a 'None' quantity was not properly handled and that the quantity check compared a string with an integer.
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
* bitwarden: Add field to search for all item attributes, instead of only name.
* bitwarden: Add change to changelog.
* bitwarden: Update changelog entry.
* Update changelogs/fragments/5297-bitwarden-add-search-field.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/bitwarden.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/lookup/bitwarden.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
* chore: Update lxc_container to support py3
This change is mostly just a documentation change which will report the requirements
correctly for python3-lxc. I've also removed the use of six which results in us
changing `xrange` to `range`.
Resolves: https://github.com/ansible-collections/community.general/issues/5294
Signed-off-by: Kevin Carter <kevin.carter@figment.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update changelogs/fragments/5280-lxc_container-py3.yaml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update changelogs/fragments/5280-lxc_container-py3.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update 5280-lxc_container-py3.yaml
* Update 5280-lxc_container-py3.yaml
Signed-off-by: Kevin Carter <kevin.carter@figment.io>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* terraform: run `init` with no-color, too
When running `terraform init` fails, it would output ansi color sequences, making the output hard to read.
Maybe setting TF_IN_AUTOMATION would also be beneficial: https://www.terraform.io/cli/config/environment-variables#tf_in_automation
* add changelog fragment for `terraform init -no-color`
* move changelog into correct directory; add PR link
* module_utils.proxmox: new `api_task_ok` helper + integrated with existing modules
* proxmox_snap: add `unbind` param to snapshot containers with mountpoints
* [fix] errors reported by 'test sanity pep8'
at
https://github.com/ansible-collections/community.general/pull/5274#issuecomment-1242932079
* module_utils.proxmox.api_task_ok: small improvement
* proxmox_snap.unbind: version_added, formatting errors, changelog fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* proxmox_snap.unbind: update version_added tag
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add SetSessionService to redfish_config
adding SetSessionService command to redfish_config
to set BMC default session timeout policy.
Fixes#5008
* fix white space issues
* Making Requested changes:
- changed category from SessionService to Sessions
- changed set_sessionservice() to set_session_service()
- other misc. changes for cleanup
* Apply suggestions from code review
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Fix issues with checks
* Fix issues with checks part 2
* Fix issues with checks part 3
* Update plugins/modules/remote_management/redfish/redfish_config.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* add a couple conditionals to make sure updating can be done with vmid only
* add changelog to PR
* replace conditional with any
* any takes list
* fix next conditional
* Update changelogs/fragments/5206-proxmox-conditional-vmid.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* capitalize VM and remove conditional for name requirement upon creation
* Fix URL destroyed by GitHub.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Yvan E. Watchman <git@yvanwatchman.eu>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* homebrew: add Linux brew path to defaults
* changelogs: add 5241 fragment
* homebrew_tap: add Linux brew path to defaults
* changelogs: update 5241 entry
* homebrew_tap: format path separator in desc
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* WDC Redfish support for setting the power mode.
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add change fragment.
* Add extension to changelog fragment.
Co-authored-by: Felix Fontein <felix@fontein.de>
* The EnvironmentError is now handled in the splid_pid_name function.
The error also had a wrong indentation. See previous setup with correct setup: 6a7811f696/plugins/modules/system/listen_ports_facts.py
* Add changelog fragment
* Sanity Check failed before
* Update changelogs/fragments/5202-bugfix-environmentError-wrong-indentation.yaml
Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* nmcli: avoid changed status for most cases with VPN connections
Follow-up https://github.com/ansible-collections/community.general/pull/4746
* `nmcli connection show` includes vpn.service-type but not vpn-type.
Switching to vpn.service-type removes unneeded diffs while keeping
the same functionality, as vpn-type is an alias of vpn.service-type
per nm-settings-nmcli(1).
NetworkManager also adds `org.freedesktop.NetworkManager.` prefix for
known VPN types [1]. The logic is non-trivial so I didn't implement it
in this commit. If a user specifies `service-type: l2tp`, changed will
be always be True:
- "vpn.service-type": "org.freedesktop.NetworkManager.l2tp"
+ "vpn.service-type": "l2tp"
* The vpn.data field from `nmcli connection show` is sorted by keys and
there are spaces around equal signs. I added codes for parsing such
data.
Tests are also updated to match outputs of nmcli commands.
[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/1.38.4/src/libnm-core-impl/nm-vpn-plugin-info.c#L619
* Add changelog
* Some suggested changes
* Make space stripping more flexible - works for cases without equal
signs.
* Keep vpn.data in a test case with no spaces
* nmcli: allow any string for vpn service-type
Using `local: true` users can enforce to work only with local policy
modifications. i.e.
# Without `local`, no new modification is added when port already exists
$ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp' localhost
localhost | SUCCESS => {
"changed": false,
"ports": [
"22"
],
"proto": "tcp",
"setype": "ssh_port_t",
"state": "present"
}
$ sudo semanage port -l -C
# With `local`, a port is always added/changed in local modification list
$ sudo ansible -m seport -a 'ports=22 state=present setype=ssh_port_t proto=tcp local=true' localhost
localhost | CHANGED => {
"changed": true,
"ports": [
"22"
],
"proto": "tcp",
"setype": "ssh_port_t",
"state": "present"
}
$ sudo semanage port -l -C
SELinux Port Type Proto Port Number
ssh_port_t tcp 22
# With `local`, seport removes the port only from local modifications
$ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost
localhost | CHANGED => {
"changed": true,
"ports": [
"22"
],
"proto": "tcp",
"setype": "ssh_port_t",
"state": "absent"
}
$ sudo semanage port -l -C
# Even though the port is still defined in system policy, the module
# result is success as there's no port local modification
$ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp local=true' localhost
localhost | SUCCESS => {
"changed": false,
"ports": [
"22"
],
"proto": "tcp",
"setype": "ssh_port_t",
"state": "absent"
}
# But it fails without `local` as it tries to remove port defined in
# system policy
$ sudo ansible -m seport -a 'ports=22 state=absent setype=ssh_port_t proto=tcp' localhost
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: Port tcp/22 is defined in policy, cannot be deleted
localhost | FAILED! => {
"changed": false,
"msg": "ValueError: Port tcp/22 is defined in policy, cannot be deleted\n"
}
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
* Update redfish module for compatibility with VirtualMedia resource location from Manager to Systems
* Add changelogs fragments for PR 5124
* Update some issue according to the suggestions
* update changelogs fragment to list new features in the minor_changes catagory
Co-authored-by: Tami YY3 Pan <panyy3@lenovo.com>
* Fix nsupdate when updating NS record
* Changelog fragment
* Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Switch to fallback to AUTHORITY instead of using with NS type.
* Update plugins/modules/net_tools/nsupdate.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nsupdate.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* pipx: add state latest
* add changelog fragment
* Update plugins/modules/packaging/language/pipx.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add sanity test (currently fails).
* doc_fragments can also be non-GPLv3+.
* Replace 'Author:' by 'Copyright:' in some specific cases.
* Avoid matching string for license checkers.
* Reformulate not to throw license detection off.
* Add PSF copyright notice for plugins/module_utils/_mount.py.
* Add generic copyright notices.
* Update changelog fragment.
* WDC Redfish support for chassis indicator LED toggling.
* Added changelog fragment.
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Move licenses to LICENSES/, run add-license.py, add LICENSES/MIT.txt.
* Replace 'Copyright:' with 'Copyright'
sed -i 's|Copyright:\(.*\)|Copyright\1|' $(rg -l 'Copyright:')
Co-authored-by: Maxwell G <gotmax@e.email>
* xfconf: add command output to results
* add changelog fragment
* add docs for return value cmd
* Update plugins/modules/system/xfconf.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix: Add user agent header to allow request through CDN/WAF with bot protection
* upate doc-fragment
* move http_agent variable assignment
* set http_agent param for all Keycloak API Requests
* Update plugins/doc_fragments/keycloak.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/5023-http-agent-param-keycloak.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix formatting
* Update plugins/doc_fragments/keycloak.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Slack: Add support for (some) groups
Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.
Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.
* Add changelog fragment for slack channel prefix fix
* Update changelogs/fragments/5019-slack-support-more-groups.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Initial Rework of netstat and ss to include additional information.
State, foreign address, process.
* Fixed sanity tests. Python 2 compatible code. pylint errors resolved.
* Sanity tests. ss_parse fix minor error I created before.
* Rename variable for clarity
* Python2 rsplit takes no keyword argument. -> remove keyword argument
* Generic improvments for split_pid_name. Added changelog
* Sanity Test (no type hints for python2.7)
* add include_non_listening param. Add param to test. Add documentation. Only return state and foreign_address when include_non_listening
* Update changelogs/fragments/4953-listen-ports-facts-extend-output.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add info to changelog fragment. Clarify documentation.
* The case where we have multiple entries in pids for udp eg: users:(("rpcbind",pid=733,fd=5),("systemd",pid=1,fd=30)) is not in the tests. So roll back to previous approach where this is covered. Fix wrong if condition for include_non_listening.
* Rewrite documentation and formatting.
* Last small documentation adjustments.
* Update parameters to match description.
* added test cases to check if include_non_listening is set to no by default. And test if ports and foreign_address exists if set to yes
* undo rename from address to local_address -> breaking change
* Replace choice with bool, as it is the correct fit here
* nestat distinguishes between tcp6 and tcp output should always be tcp
* Minor adjustments in the docs (no -> false, is set to yes -> true)
Co-authored-by: Paul-Kehnel <paul.kehnel@ocean.ibm.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Pacman: Add support for setting install reason
* Improved description
* Fix documentation
* Add changelog fragment
* Use source for installation
* Get all reasons at once
* Removed default for reason
* Added version info to documentation
* Fix NameError
* Moved determination of reason to _build_inventory
* Fix duplication and sanity errors
* adjust tests for changed inventory
* Documentation: remove empty default for reason
* mention packages with changed reason in exit params/info
* Added integration tests for reason and reason_for
Inspired by the integration tests for url packages
* Correct indentation
* Fix indentation
* Also sort changed packages in normal mode
* Also sort result in unit test
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix returnall for gopass
Gopass was always given the --password flag, despite there being no need for this.
* Add changelog fragment
Co-authored-by: Sylvia van Os <sylvia.van.os@politie.nl>
* gconftool2: deprecate state get
* added changelog fragment
* Update plugins/modules/system/gconftool2.py
* Update plugins/modules/system/gconftool2.py
* Expose unredirected_headers to module
In some cases, when the initial request returns a redirect and we want
to follow it to get the artifact, we might not want to include certain
headers in the redirection request. Specially headers like
Authorization and Cookies.
Or perhaps the redirect server returns a 400 because it included some
unexpected headers.
Fetch url already supports this feature, but it was being shadowed by
maven_artifact. In here we just expose it.
* Fix Linting errors
* Applied Comments
- Specified version added
- Changed description of unredirected_headers
* Check for ansible version
If it's 2.11 or older, we ignore unredirected_headers, otherwise we use
it, as fetch_url has them
* Applied comments
- Removed duplicated code in the call of fetch_url. Used kwargs instead
- Added check if unredirected_params is not empty and the fetch_url
function does not support it
- Changed function that checks for ansible version
- Removed unused import
* Remove 2.11 breaking change
Made default only for ansible-core version 2.12 and above, but for keep
it empty for ansible-core version 2.11 and below.
Also include the following changes:
- change doc to use C() on the function description
- changed doc to use ansible-core instead of Ansible
* Changes in description for readability
* Add changelog fragment
* Change description changelog fragment
* Fix keyring_info when using keyring library
This line used to always clobber the passphrase retrieved via the `keyring` library, making it useless on everything except gnome-keyring. After this change, it'll only use the alternate method if the default one didn't work.
* delete whitespace
* add changelog fragment
* Update changelogs/fragments/4964-fix-keyring-info.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Strip downloading... of unseen URLs
* Added changelog fragment
* Added integration tests for reason and reason_for
Inspired by the integration tests for url packages
* Revert "Added integration tests for reason and reason_for"
This reverts commit f60d92f0d7.
Accidentally commited to the wrong branch.
* add int parse handling
* Revert "add int parse handling"
This reverts commit db2aac4254.
* fix: vmid check if state is absent
* add changelogs fragments
* Update changelogs/fragments/4945-fix-get_vm-int-parse-handling.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix path detection for gopass
As per fc8c9a2286/docs/features.md (initializing-a-password-store), gopass defaults to ~/.local/share/gopass/stores/root for its password store root location.
However, the user can also override this, and this will be stored in the gopass config file (ed7451678c/docs/config.md (configuration-options)).
This patch ensures that the config setting in gopass is respected, falling back to the default gopass path. pass' behaviour remains unchanged.
* Formatting improvements
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add changelog fragment
* Formatting improvement
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Update proxmox.py
* Forgot a debug print.
* pep
* Check if int, old school way.
* pep, once again.
* Create 4910-fix-for-agent-enabled.yml
* Must check the first listentry for enabled=1
* Update changelogs/fragments/4910-fix-for-agent-enabled.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* added password prompt support for machinectl
* include review comments
This includes the review comments as well as changelog fragment. This also gives more information about the polkit rule.
* fix yaml doc with leftover bracket
* include review comments 2
* move regex compile to global scope
this is especially useful for the `enable_from_environment` option, as
this allows to set a default for the whole project, instead of relying
on everyone setting the environment variable
* Use syntax that works in both Python 2 and 3 when iterating through a
dict that's going to be mutated during iteration
* Fixes `dictionary changed size during iteration` error
* Fixes#4932
* fixes lxd connection plugin issue #4886
remote_addr value was set to literal string 'inventory_hostname' instead
of the value for inventory_hostname variable. solution found in PR
ansible/ansible#77894
* changelog fragment - bugfix - lxd connection plugin
* correct changelog fragment
* Update changelogs/fragments/4886-fix-lxd-inventory-hostname.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* replace _host instance variable with calls to get 'remote_addr' option
suggested by felixfontein
Co-authored-by: Felix Fontein <felix@fontein.de>
* Do not ignore tld option in DSV lookup plugin
* add changelog fragment
* Update changelogs/fragments/4911-dsv-honor-tld-option.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix GetChassisPower when multiple chassis are present
When multiple chassis are present, and one or more of those chassis do _not_
report power information, the GetChassisPower command will fail. To address
that, only report a failure if _all_ of the Chassis objects lack power
power reporting functionality.
Fixes#4901
* Update changelogs/fragments/4901-fix-redfish-chassispower.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add GetManagerInventory command to redfish_info
Adding GetManagerInventory command to redfish_info, similar to
GetSystemInventory to report Manager specific information like:
- FirmwareVersion
- Model
- ManagerType
Fixes#4899
* Update changelogs/fragments/4899-add-GetManagerInventory-for-redfish_info.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Use visudo to validate sudoers rules before use
* Replace use of subprocess.Popen with module.run_command
* Switch out apt for package
* Check file mode when verifying file to determine whether something needs to change
* Only install sudo package for debian and redhat environments (when testing)
* Attempt to install sudo on FreeBSD too
* Try just installing sudo for non-darwin machines
* Don't validate file ownership
* Attempt to install sudo on all platforms
* Revert "Attempt to install sudo on all platforms"
This reverts commit b9562a8916.
* Remove file permissions changes from this PR
* Add changelog fragment for 4794 sudoers validation
* Add option to control when sudoers validation is used
* Update changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add version_added to validation property
Co-authored-by: Felix Fontein <felix@fontein.de>
* Also validate failed sudoers validation error message
Co-authored-by: Felix Fontein <felix@fontein.de>
* Make visudo not executable instead of trying to delete it
* Update edge case validation
* Write invalid sudoers file to alternative path to avoid breaking sudo
* Don't try to remove or otherwise modify visudo on Darwin
* Update plugins/modules/system/sudoers.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove trailing extra empty line to appease sanity checker
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add PSF-license.txt for plugins/module_utils/_mount.py.
* Move other licenses to licenses/.
* Revert "Move other licenses to licenses/."
This reverts commit eab4209889.
* passwordstore: Make compatible with shims, add backend config
This allows using the passwordstore plugin with scripts that wrap other
password managers. Also adds an explicit configuration (`backend` in
`ini` and `passwordstore_backend` in `vars`) to set the backend to `pass`
(the default) or `gopass`, which allows using gopass as the backend
without the need of a wrapper script. Please be aware that gopass
support is currently limited, but will work for basic operations.
Includes integrations tests.
Resolves#4766
* Apply suggestions from code review
* cmd_runner: add __call__ method to invoke context
* change xfconf to use the callable form
* add changelog fragment
* Update changelogs/fragments/4791-cmd-runner-callable.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Only pass subcommands when they are specified as module arguments.
* When 'subcommands' is specified, 'link' must be given for every subcommand.
* Extend subcommand tests.
The 'unsubscribe' command of 'subscription-manager' was deprecated
already in subscription-manager 1.11.3, shipped with RHEL 5.11.
As it was removed in subscription-manager 1.29.x, unsubscribing from
pools was thus broken.
The simple fix is to call the proper command, 'remove'.
* alternatives: Fix bug with priority default
If neigther the priority nor the subcommands where specified the module decided to update the priority with the default value anyway. This resulted in bug #4803 and #4804
* Add changelog fragment.
* Distinguish None from 0.
* Address review comments.
* Update plugins/modules/system/alternatives.py
Co-authored-by: Pilou <pierre-louis@libregerbil.fr>
* Remove unrelated issues from changelog.
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Pilou <pierre-louis@libregerbil.fr>
* Ensure sudoers config files are created with 0440 permissions to appease visudo validation
* Remove change not required by the bugfix
* Add changelog fragment for 4814 sudoers file permissions
* Update changelogs/fragments/4814-sudoers-file-permissions.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Have less oct casting
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added conditional to only collect qmpstatus on qemu VMs
* Processed feedback, added changelog
* Initial change to unit tests
* Made Sanity tests happy again
* Missed a function call, removed superfluous function
* Derp, no need to mock get_vm_status anymore
* Added detail checks whether hosts are mapped to the paused/prelaunch groups
* Fix sanity check
* Processed feedback
* Processed feedback - noqa
* add support to create L2TP and PPTP VPN connection
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* apply changes pointed on tests and review
- add changelog fragment
- change example code to use jinja2 in place of shell command
* removes trailing whitespace
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* removes linux command from examples
* remove unnecessary brakets
Co-authored-by: Felix Fontein <felix@fontein.de>
* remove unnecessary brakets
Co-authored-by: Felix Fontein <felix@fontein.de>
* simplify psk encoding on example
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* add unit tests
- test unchenged l2tp and pptp vpn connections
- test create l2tp and pptp vpn connections
- fix is_connection_changed to remove default ifname attribuition
* improve tests on vpn.data param
- fix _compare_conn_params to handle vpn.data as lists
* removes block and set_fact from example
Co-authored-by: Felix Fontein <felix@fontein.de>
* makes line shortter to better reading
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* xfconf: changed implementation to use cmd_runner
* added module_utils/xfconf.py
* xfconf_info: using cmd_runner
* added module_utils to BOTMETA.yml
* added changelog fragment
* use cmd_runner_fmt instead of deprecated form