Factorize the current logic to determine whether use 'environments' as
D-Bus registration option (rather than 'environment') in an own
function, so it is easier to read it and maintain it.
With the small helper function in place, extend the logic to support
CentOS: it is in practice the same as the RHEL one, with an additional
check to support CentOS Stream 8 (which is a rolling release, and not
versioned).
- remove Barnaby, Adrian, and Kevil from redhat_subscription, as they
are no more working on subscription-manager
- create a new team_rhsm group to maintain redhat_subscription,
rhsm_release, and rhsm_repository (all the modules related to
subscription-manager)
- add myself and cnsnyder to team_rhsm
When registering using D-Bus and using a version of subscription-manager
with an unimplemented 'force' option, then unregister manually the
system only if it is registered. 'subscription-manager unregister'
errors out when trying to unregister an already unregistered system.
* pipx: Document parameters supported with state=latest
* pipx: Support "include_injected" with states "upgrade" and "latest"
- Contrary to documentation, "include_injected" doesn't appear to have
worked with state=upgrade since it was introduced.
- Add support for include_injected with "latest", since "latest" is
specified as being install+upgrade.
* Add changelog fragment
* Update plugins/modules/pipx.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
* pipx: Update to correct target release of community.general
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add module to manipulate KDE config files using kwriteconfig
* Fix license issues
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add smeso as kdeconfig.py maintainer
* Fix attributes fragment name
* Fix test
* Do not use shutil.chown
It isn't available on old Python versions
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added call method to select proper response from xo server
* Added changelog fragment
* Removed excess blank lines
* Moved period in changelog fragment
* Made suggested changes
* Remove f-strings for Python 2.7 compatibility
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Linus Kirkwood <lkirkwood@allette.com.au>
Co-authored-by: Felix Fontein <felix@fontein.de>
* nmcli: fixed idempotency issue with 'may_fail4' when 'method' is 'disabled'
* added note to documentation
* updated changelog fragment
* Update changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* add runner_fast_rate option
* unset default value for runner_fast_rate parameter
* add some commas
* Remove default in copy of argspec.
Co-authored-by: Sam Potekhin <eax24@ya.ru>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Sam Potekhin <eax24@ya.ru>
* pipx: Allow injected modules to add apps
Add support for pipx inject's "--include-apps" parameter.
* add changelog fragment
* fix pipx test ("install_apps", not "include_apps")
* fix pipx test -- add a second invocation for install_apps
* Update changelogs/fragments/6198-pipx-inject-install-apps.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/pipx.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* feat(ssh_config): proxyjump option
* feat(ssh_config: add proxyjump test
* CamelCase ProxyJump
* add changelog fragment
* Update plugins/modules/ssh_config.py
add version_added
Co-authored-by: Felix Fontein <felix@fontein.de>
* update task name to include new proxyjump option
* adding tests for proxyjump option
* fixing assert variable name
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
We simply add a param to allow proxmox administrator to restore VM from
an archives. This new option will be useful to automate automatic
creation and restore of VM.
Co-authored-by: Julian Vanden Broeck <julian.vandenbroeck@dalibo.com>
* clean performs apt-get clean.
* dist_upgrade performs apt-get dist-upgrade.
* update_kernel performs update-kernel to upgrade kernel packages.
* update_cache, clean, dist_upgrade and update_kernel can be used with and without specified packages.
The module currently has a static 'required_if' statement for its
parameters that forces any of 'username' or 'activationkey' or 'token'
in case state=present; while this is generally a good idea, it can be
an extra requirements in some cases. In particular, if the system is
already registered, there is no need for credentials -- some of the
operations of the module, such as manipulating pools, can be done
perfectly without credentials.
Hence:
- change the static 'required_if' to require credentials only when
forcing the registration
- check for credentials manually when a registration is needed, i.e.
on an unregistered system; the fail message is the same as the one
shown by 'required_if'
Adapt the tests to this new situation:
- test_without_required_parameters now needs to mock an unregistered
system
- add a new version of test_without_required_parameters to test an
already registered system
- add a simple test case for only state=present usable on an already
registered system
- remove the credentials from a test case for pool attachment that
mocks an already registered system
subscription-manager on RHEL installs a symlink in /usr/bin to
console-helper (part of usermode), which triggers an interactive prompt
for root credentials when run as user. It seems that console-helper
does not handle well non-interactive contexts (e.g. without a TTY for
input), and thus it will hang waiting for input when run as user in an
Ansible task.
Since subscription-manager requires root already anyway (and it will
fail when explicitly run as user), then apply the same logic locally on
all the modules that interact with it: redhat_subscription,
rhsm_release, and rhsm_repository.
* Replace deprecated error with BadZipFile
* Use imported BadZipFile
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add news fragment
* Update new fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix influxdb_user grants in check mode
When running in check mode, `influxdb_user` will return error when the user doesn't exist yet, instead of reporting `changed` state.
* Update changelogs/fragments/6111-influxdb_user-check-mode.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding support for `-p` option to specify port(s) to scan
* Adding changelog fragment file
* Corrected appending options
* Edit to doc section
* Correction in documentation type
* Fixed `:` use in doc breaking yaml
* Update changelogs/fragments/6165-nmap-port.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/nmap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/nmap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding usage example
* Adding comment to example that was missed
* Breaking line up, was too long for sanity test 160 char limit
* Still too long since spaces are counted
* Changed type to string to work for a single entry as well as comma separated values
* Update changelogs/fragments/6165-nmap-port.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/nmap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* openbsd_pkg: set TERM to 'dumb' in execute_command
Keeps pkg_add happy when someone running ansible is using a TERM that
the managed OpenBSD host does not know about.
Fixes#5738.
Selection of specific TERM from discussion at
https://marc.info/?l=openbsd-tech&m=167290482630534&w=2
* Add changelog fragment for openbsd_pkg TERM fix
* Update changelogs/fragments/6149-openbsd_pkg-term.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updating yarn.list to not fail when when warnings are emitted
* Adding changelog fragment
* Adding _process_yarn_error function
* - Adding back changes to the changelog fragment
- Fixing formatting
* Fix trailing whitespace
* Update plugins/modules/yarn.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
subscription-manager currently does not have a way to get credentials
(username, password, activation keys, organization ID) in a secure way:
the existing command line parameters can be easily spotted when running
a process listing while 'subscription-manager register' runs.
There is a D-Bus service, which is used by e.g. cockpit and Anaconda to
interface with RHSM (at least for registration and common queries).
Try to perform the registration using D-Bus, in a way very similar to
the work done in convert2rhel [1] (with my help):
- try to do a simple signal test to check whether the system bus works;
inspired by the login in the dconf module
- pass most of the options as registration options; for the few that are
not part of the registration, execute 'subscription-manager' manually
- add quirks for differently working (or not) registration options for
the D-Bus Register*() methods depending on the version of RHEL
- 'subscription-manager register' is used only in case the signal test
is not working; silent fallback in case of D-Bus errors during the
registration is not done on purpose to avoid silent fallback to a less
secure registration
[1] https://github.com/oamg/convert2rhel/pull/540/
It may happen operator wants to get the built command instead of all the
parameters. This change injects a new entry in the dict output, showing
what command way actually launched.
This patch also takes the opportunity to add missing dots to some
documentation lines.
This change reorder the parameters so that we get the mandatory one at
the top, then alphabetically order the other bellow.
It also adds the returned values.
dconf: parse GVariant values to check for equality whenever possible
Direct string comparisons are an inaccurate way to compare two
GVariant representations. For example, 'foo' and "foo" (including the
quote marks, which are part of the representation) are equal GVariants
but if you just do a string compare (remember, including the quotes)
they'll be interpreted.
We therefore want to use the `gi.repository` Python library to parse
GVariant representations before comparing them whenever possible.
However, we don't want to assume that this library will always be
available or require it for Ansible to function, so we use a straight
string comparison as a fallback when the library isn't available. This
may result in some false positives, i.e., Ansible thinking a value is
changing when it actually isn't, but will not result in incorrect
values being written into `dconf`.
Co-authored-by: Jonathan Kamens <jik@jik5.kamens.us>
The fix ensures that no 'KeyError' is raised, when 'access_level' is not provided as module parameter or when 'access_level_on_creation' is false.
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Co-authored-by: Christoph Fiehe <c.fiehe@eurodata.de>
This fixes the following warning on FreeBSD:
[WARNING]: The "jail" connection plugin has an improperly configured
remote target value, forcing "inventory_hostname" templated value
instead of the string