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

1319 commits

Author SHA1 Message Date
Alexei Znamensky
ad6ff9b0c5
cpanm: apply MH feature (#6385)
* cpanm: apply MH feature

* add changelog frag
2023-04-22 22:58:02 +02:00
efrikin
0eb33c2839
Add support env variables for nmap inventory plugin (#6352)
* Add support env variables for nmap inventory plugin

* Add  changelogs/fragments file

* Rename support-env-variables-to-nmap-dynamic-inventoiry to 6351-support-env-variables-to-nmap-dynamic-inventoiry

* Add extension for changelog file

* Fix https://github.com/ansible-collections/community.general/pull/6352#discussion_r1167973326

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

* Fix https://github.com/ansible-collections/community.general/pull/6352#discussion_r1167973295

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

* Fix https://github.com/ansible-collections/community.general/pull/6352#discussion_r1167973265

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

* Fix https://github.com/ansible-collections/community.general/pull/6352#discussion_r1167973193

* Fix linter

* Fix https://github.com/ansible-collections/community.general/pull/6352#discussion_r1168014445

* Fix changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-22 22:56:13 +02:00
fachleitner
114eb67f58
keycloak: Add option to create authentication sub-flow of type 'form flow' (#6318)
* keycloak: Improve API error message

* keycloak: Fix API error message

They key 'provider' is undefined.

* keycloak: Allow the creation of 'form-flow' authentication sub flows

To create something like keycloak's built-in registration flow,
we need to create a subflow with the type 'form-flow'.

* Add changelog fragment 6318

* Update changelogs/fragments/6318-add-form-flow.yml

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

* Update plugins/modules/keycloak_authentication.py

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

* Update plugins/modules/keycloak_authentication.py

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

* keycloak_authentication: Don't compare subFlowType

It is only useful for creation.

* Update changelogs/fragments/6318-add-form-flow.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-22 22:55:56 +02:00
Jan Sobczak
f4dd4d5ace
Add append option to ipa_hostgroup module (#6203)
* Add append option to ipa_hostgroup module

Signed-off-by: Jan Sobczak <jan.sobczak@soit.com.pl>

* Update plugins/modules/ipa_hostgroup.py

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

* Update plugins/modules/ipa_hostgroup.py

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

* Add changelog fragment

Signed-off-by: Jan Sobczak <jan.sobczak@soit.com.pl>

* Move choices argument to previous line

Signed-off-by: Jan Sobczak <jan.sobczak@soit.com.pl>

* Update plugins/modules/ipa_hostgroup.py

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

* Update changelogs/fragments/6203-add-append-option-to-ipa-hostgroup.yml

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

---------

Signed-off-by: Jan Sobczak <jan.sobczak@soit.com.pl>
Co-authored-by: Jan Sobczak <jan.sobczak@soit.com.pl>
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-22 22:55:36 +02:00
Mike Raineri
484f642c23
Redfish iDRAC: Allow for specifying an exact manager with 'resource_id' for CreateBiosConfigJob (#6370)
Allow for specifying an exact manager with 'resource_id' for CreateBiosConfigJob

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
2023-04-20 06:59:52 +02:00
Alexei Znamensky
4171418e37
snap_alias: fix regex expression when listing aliases (#6361)
* snap_alias: fix regex expression when listing aliases

* simplify regex, add changelog
2023-04-20 06:56:21 +02:00
Paul Aurich
996fc8c18e
pipx: fix state=latest w/ install_deps=true (#6303)
* pipx and pipx_info: Document that modules require pipx 0.16.2.1 or above

Since their introduction, these modules rely on 'pipx list --json' to
return machine-readable output about installed pipx applications. That
functionality was introduced in 0.16.2, along with a critical bug fix
(invalid json) in 0.16.2.1.

* pipx: fix state=latest with install_deps=true

"pipx upgrade" stopped supporting the "--include-deps" option
("install_deps" in the ansible module) in pipx 0.15
(https://pypa.github.io/pipx/changelog/#01500).

The lack of support causes the pipx module to fail if attempting to use
state=latest with install_deps, since the parameter is passed to both
pipx install (fine) and pipx upgrade (fails).

* Add changelog fragment
2023-04-20 06:43:49 +02:00
yoannlr
76dd465e08
icinga2_host: make use of templates and template vars (#6286)
* icinga2_host: make use of templates, append vars instead of replacing all vars array.

* Initialize `template` variable. Add changelog fragment.

* Update changelogs/fragments/6286-icinga2_host-template-and-template-vars.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-20 06:17:16 +02:00
Svenum
6e0bc4f45c
Remove --app by flatpak check if already installed (ansible-collectio… (#6289)
* Remove --app by flatpak check if already installed (ansible-collections#6265)

* Add Changelogfragment

* Fix syntax

* Update changelogs/fragments/6289-bugfix-flatpak-check-if-already-installed.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-20 06:15:46 +02:00
Mike Raineri
087c5a53d5
Redfish iDRAC: Added job_id to response for CreateBiosConfigJob (#6367)
* Redfish iDRAC: Added job_id to response for CreateBiosConfigJob

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

* YAML fix to changelog fragment

Signed-off-by: Mike Raineri <michael.raineri@dell.com>

---------

Signed-off-by: Mike Raineri <michael.raineri@dell.com>
2023-04-19 20:11:57 +02:00
Alexei Znamensky
59cb5b2d6f
dconf: minor refactor (#6336)
* dconf: minor refactor

* add changelog frag

* Update plugins/modules/dconf.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-16 22:19:26 +02:00
Kevin P. Fleming
64e797d077
dig: Support multiple domains in a single lookup (#6334)
* dig: Support multiple domains in a single lookup (#6334)

The docs for this plugin indicated that multiple domains could be
specified at once, but the code did not support multiple domains.

* Address review feedback.
2023-04-16 14:26:44 +02:00
Phillipe Smith
a35542d0d1
Rundeck modules fixes and improvements (#6300)
* feat: add token alias to api_token parameter

* fix: return (None, info) on empty content response

* feat: update the modules for using module_utils.rundeck funcs

* docs: add changelog fragment

* fix: add trailing commas

* fix: changelog fragment invalid syntax

* fix: changelog typos

* fix: remove token aliases from api_token

* fix: add token alias to api_token param

* fix: add partial overwrite of params and docs
2023-04-16 13:23:39 +02:00
Georg Gadinger
cb3ca05bd1
one_vm: fix syntax error when creating VMs with a more complex template (#6294)
* one_vm: fix syntax error when creating VMs with a more complex template

with more complex templates that make use of quoted strings the new
"render" method fails to produce a template that is accepted by
OpenNebula.  ==> escape double quotes in strings to make OpenNebula
happy again.

I also tested whether newlines need to be escaped, looks like they are
fine as they are.

Fixes #6225

* module_utils/opennebula: skip empty values in render
2023-04-16 13:22:49 +02:00
Sergey Putko
29a7d24d75
nmcli: Add macvlan connection type support (#6312)
* add nmcli macvlan type

* changelog

* improve docs

* macvlan params

* fix linter and improve module params

* improve_docs

* raise error if type macvlan and macvlan options not set
2023-04-16 13:22:11 +02:00
Pino Toscano
83994c0a2d
redhat_subscription: use CLI when using environments (#6319)
It turns out that the 'environments' that the D-Bus Register*() APIs
accept are the IDs of the environments, and not the user-facing names of
the environments (which is what the module has been accepting so far).

Since there is no easy way to do the mapping manually, for now use again
the subscription-manager CLI for registering when environments are
specified.
2023-04-13 07:17:53 +02:00
LanceNero
bf780ea738
terraform: remote state file exists check issue (#6296)
* remote state file exists check

In the official CLI implementation of Terraform, if the state file does not exist, a new one will be created, and there is no need to check that the state file already exists and with an error if file not exists.

```bash
# Test command
terraform apply -state test.tfstate. # if state file not exists ,terraform will create a new one
terraform destroy -state test1.tfstate  ### Terraform will not throw any error, the command will succeed execute, only report no resource has destroy
```

* Update terraform.py

add 1 blank line to function end

* Create 6296-LanceNero-Terraform_statefile_check

remove file exists check (https://github.com/ansible-collections/community.general/pull/6296)

* resolve if case issue

* Add blank line

* Update 6296-LanceNero-Terraform_statefile_check

* Update changelogs/fragments/6296-LanceNero-Terraform_statefile_check

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

* update code style

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

* Update suffix to correct CI issue

* Update Code Style

* Update bug-fix to feature release

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2023-04-13 06:55:52 +02:00
Jonathan Kamens
a5765143f1
dconf: three minor but useful fixes (#6206)
* dconf: Correctly handle setting a key that has no value in DB

We need to check if the value in the database is None before we try to
parse it, because the GVariant parser won't accept None as an input
value. By definition if the value is None, i.e., there's no value in
the database, than any value the user is trying to set is a change, so
just indicate that it's a change without trying to compare the None to
whatever the user specified as the value.x

* dconf: Give a more useful error when writing a key fails

if writing a key fails, then include in the error that is returned the
exact key and value aguments that were given to the dconf command, to
assist in diagnosing failures caused by providing the key or value in
the wrong format.x

* dconf: Convert boolean values into the format that dconf expects

Even though we warn users to be careful to specify GVariant strings
for values, a common error is to be trying to specify a boolean string
which ends up getting converted into a boolean by the YAML parser or
Ansible. Then it gets converted to "True" or "False", the string
representations of Python booleans, which are not valid GVariants.

Rather than just failing with an obscure error when this happens,
let's be more user-friendly and detect when the user has specified a
boolean and convert it into the correct GVariant forms, "true" or
"false", so it just works. There's no good reason to be more pedantic
than that.
2023-04-13 06:52:14 +02:00
Claude Becker
6c5c05dfdc
homebrew: respect greedy flag for cask upgrade_all (#6267)
* homebrew: respect greedy flag for cask upgrade_all

* homebrew: implement feedback from code review
2023-04-13 06:41:23 +02:00
Jon-Paul Lindquist
ea8720f572
Add skip_tags option to Puppet module (#6293)
* Add Puppet skip_tags option

* Include changelog fragment

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-13 06:40:54 +02:00
Nils Meyer
14b19afc9a
archive: Generate crc32 over 16MiB chunks (#6274)
* archive: Generate crc32 over 16MiB chunks

Running crc32 over the whole content of the compressed file potentially
requires a lot of RAM. The crc32 function in zlib allows for calculating
the checksum in chunks. This changes the code to calculate the checksum
over 16 MiB chunks instead. 16 MiB is the value also used by
shutil.copyfileobj().

* Update changelogs/fragments/6199-archive-generate-checksum-in-chunks.yml

Change the type of change to bugfix

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

* Update changelogs/fragments/6199-archive-generate-checksum-in-chunks.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-13 06:40:16 +02:00
Paul Aurich
f93a1bf5ec
pipx: Add support for system_site_packages (#6308)
* pipx: Add support for system_site_packages

* Add changelog fragment
2023-04-10 09:10:32 +02:00
Alexei Znamensky
a64e36820f
mksysb: improve visibility on the output (#6269)
* mksysb: improve visibility on the output

* add changelog frag
2023-04-05 13:55:49 +02:00
Lorenzo Tanganelli
cee5f31b70
Add support to topics on Gitlab Project module (#6278)
* add topics to gitlab_project.py

* add chngelog fragment

* fix lint error

* Update changelogs/fragments/6277-add-topics-gitlab-project.yml

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

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-04-03 22:02:20 +02:00
Pino Toscano
c280b793de
redhat_subscription: fix D-Bus option for environments on CentOS (#6275)
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).
2023-04-03 21:26:56 +02:00
Pino Toscano
c9e11e5c0c
redhat_subscription: manually unregister only when registered (#6259)
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.
2023-04-03 21:03:43 +02:00
Paul Aurich
33093e9f3e
pipx: document parameters supported with state=latest, and fix include_injected parameter (#6212)
* 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>
2023-03-30 07:28:24 +02:00
Hugo Prudente
be7f11bf39
Add worklog functionality to jira module (#6210)
community.general#6209 Add worklog functionality to jira
2023-03-26 09:31:06 +02:00
barloff-st
59e58079cb
Adding open option to nmap (#6200)
* Adding nmap `open` option

* Removing accidental copy/paste issue

* Update changelogs/fragments/6200-adding-open-option-to-nmap.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>
2023-03-26 09:29:55 +02:00
lirkwood
cd706454ec
Fixed XenOrchestra inventory plugin failing due to not checking response ID. (#6227)
* 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>
2023-03-26 09:29:36 +02:00
Sam Potekhin
81b16a88ee
nmcli: fixed idempotency issue when config bridge connection (#6105)
* nmcli: fixed idempotency issue when config bridge connection

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-26 09:28:51 +02:00
Sam Potekhin
5ee687049f
nmcli: fixed idempotency issue with 'may_fail4' when 'method' is 'disabled' (#6106)
* 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>
2023-03-26 09:28:06 +02:00
Alex Groshev
d4f272ba52
nmcli: add runner_fast_rate option (#6148)
* 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>
2023-03-26 09:27:00 +02:00
Paul Aurich
6fa833feed
pipx: Allow injected modules to add apps (#6198)
* 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>
2023-03-26 09:17:55 +02:00
ky13
33ccabed13
added hpe thermal config and fan percent min (#6208)
* added hpe thermal config and fan percent min

* typo fixed

* Create 6208-hpe-thermal-fan-percent.yaml

* fixed changelog fragment

* Update 6208-hpe-thermal-fan-percent.yaml
2023-03-25 23:18:21 +01:00
Gavin Will
e96552396e
ssh_config: add proxyjump option (#6205)
* 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>
2023-03-25 23:16:46 +01:00
Julian
7059789f35
Add archive param for proxmox_kvm module (#6159)
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>
2023-03-25 08:24:28 +01:00
Léo GATELLIER
f3be0076af
Add Gitlab group runners support (#3935) 2023-03-25 08:23:20 +01:00
Andrey Cherepanov
b1d94385ae
apt_rpm: add clean, dist_upgrade and update_kernel (#5867)
* 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.
2023-03-25 08:22:33 +01:00
Jeffrey Cutter
ed8049a220
nmcli: add new addr_gen_mode6 options (#5974)
* nmcli: add new addr_gen_mode6 options

* Add changelog fragment.

* Update plugins/modules/nmcli.py

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

* Adjust documentation.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-24 07:55:58 +01:00
Pino Toscano
bbd68e26a2
redhat_subscription: require credentials only when needed (#5664)
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
2023-03-22 20:19:55 +01:00
Pino Toscano
9f67cbbe36
rhsm modules: cleanly fail when not run as root (#6211)
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.
2023-03-22 13:15:32 +01:00
Reto Kupferschmid
512bf4b77f
ldap moduls: add optional ca_cert_file option (#6185)
* add ca_cert_file option

* fix pr url

* Apply suggestions from code review

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

* update parameter name

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-22 07:39:58 +01:00
Hugo van Kemenade
f66cc7c933
Replace deprecated error with BadZipFile (#6180)
* 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>
2023-03-22 07:39:18 +01:00
Petr Tichý
3fb1ff0b72
Fix influxdb_user grants in check mode (#6111)
* 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>
2023-03-22 07:38:31 +01:00
barloff-st
bf8f2950b4
Adding support for -p option to specify port(s) to scan (#6165)
* 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>
2023-03-19 13:27:10 +01:00
Martin Helwig
1dd86bcb55
add optional use_tls parameter (#6154)
* add optional use_tls parameter

* add optional use_tls parameter

---------

Co-authored-by: Martin Helwig <prostep.helwig@extaccount.com>
2023-03-14 23:01:59 +01:00
Patrik Lundin
b97bee3fd6
openbsd_pkg: set TERM to 'dumb' in execute_command (#6149)
* 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>
2023-03-14 23:01:06 +01:00
John Daly
df34569fad
Updating yarn.list to not fail when when warnings are emitted (#6129)
* 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>
2023-03-14 23:00:23 +01:00
Pino Toscano
e939cd07ef
redhat_subscription: use D-Bus for registration if possible (#6122)
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/
2023-03-14 22:52:51 +01:00