Commit Graph

3392 Commits (d6863eaec3470607e39aab9ac70b312243e9eed9)

Author SHA1 Message Date
cnfrancis d6863eaec3
feat(nmcli): support the fail_over_mac parameter (#9571)
* feat(nmcli): support the fail_over_mac parameter

* add fail_over_mac to +bond.options

* update unit tests

* Update changelogs/fragments/9570-feat-nmcli-add-fail-over-mac-parameter.yml

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

* Update plugins/modules/nmcli.py

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

* change to type str and add choices according to documentation

* Update plugins/modules/nmcli.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-21 20:49:34 +01:00
Alexei Znamensky 7fa859a3b8
module helper: delegate debug() to AnsibleModule (#9577)
* module helper: delegate debug() to AnsibleModule

* add changelog frag

* add comments for future

* use deprecate()

* fix errors
2025-01-20 19:38:14 +01:00
Pino Toscano bcc92e8aac
redhat_subscription: stop manual unsubscribing on unregistration (#9578)
Unregistering a system also drops all the resources for it
automatically, so there is no need to manually unsubscribing (which
actually means removing all the subscriptions).

In addition to that, newer versions of subscription-manager drop all the
support for entitlements, so the "remove" subcommand (used by
unsubscribe()) does not exist anymore, and thus the unregistration fails
with those versions.

This fixes the registration on EL 10 systems, and Fedora 41 and greater.
2025-01-20 19:37:51 +01:00
Alexei Znamensky b85d36a01f
filter plugins: adjust import __future__ for Python3, remove __metaclass__ (#9585)
* filter plugins: adjust import __future__ for Python3, remove __metaclass__

* rollback chg in test file

* add changelog frag
2025-01-20 19:37:14 +01:00
Alexei Znamensky bd864c45ff
connection/inventory: adjust import __future__ for Python3 (#9584)
* connection/inventory: adjust import __future__ for Python3

* add changelog frag

* remove metaclass

* adjust chglog
2025-01-20 19:36:29 +01:00
Alexei Znamensky 81e22180d1
action/become/cache/callback: adjust import __future__ for Python3 (#9583)
* action/become/cache/callback: adjust import __future__ for Python3

* add changelog frag

* remove metaclass

* adjust chglog

* adjust chglog
2025-01-20 19:36:21 +01:00
Nils cee62a4069
Proxmox remote pct connection (#8424)
* First Revision (squashed)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Second Revision (squashed)

* implement data_in

* Removed quot()
There is no need for quoting, exec_command gets the command already quoted with shell from Ansible

* Use shell from self._shell

* Improved error handling

* updated docs

* Use Int for Container ID

* Updated docs to include detailed description for non root usage

* Fix ansible_user var in example

* Fix become method
We need to differentiate between become method used in Proxmox and the one inside the container.

* Implement review findings
- f-Strings
- lower() when input
- yaml indent
- consistent quotes
- use to_text()
- Enhanced examples
- Ansibullbot findings

* remove ssh cache

* Ensure we delete the tempfile

* use octal mode

* Use FileLock().lock_file

* ansibullbot findings

* refactor _connect()

* Update plugins/connection/pct_remote.py

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

* Apply suggestions from code review

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

* renamed plugin to proxmox_pct_remote

* Use ansible.builtin.ping as example

* added unit tests

* fixed bugs in close()

* catch invalid host key

* test invalid host key

* Added integration test

* cleanup

* setup test via ansible

* Revised notes based on review feedback

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

* gather_facts hint in example

* Update tests/integration/targets/connection_proxmox_pct_remote/aliases

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

* Fix FreeBSD, deactivate macOS

* Test and Fix: Hang on copy with empty content

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-18 16:27:06 +01:00
Simon c823e37d00
add filter support for one_template module (#9547)
apply suggestion from code review
add one_template filter changelog fragment
rewrote filter flag to use string instead of int
renamed flag to option in changelog
added PR link to changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-15 20:30:52 +01:00
Erwan Colin e2d19a968b
Add cpanm option --with-recommends (#9555)
* Add cpanm option --with-recommands

Fix #9554

* With accepted suggestions

* Use install_recommendations for cpanm option --with-recommends

* Fix typo in changelogs/fragments/9554

recommands -> recommends

* Doc for options users have for recommands and suggests dependencies

* Add new args to the command runner.

* Add test for cpanm --with-recommends
2025-01-15 20:30:15 +01:00
Thibaut Decombe 114deae3e4
Fix homebrew tap name handling (#9546)
* Add failing test

* Use fully qualified names

* Add changelog fragment

* Remove unnecessary initial cleanup

* Fix tests/integration/targets/homebrew/tasks/formulae.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-13 18:09:06 +01:00
Vladimir Botka 94d5256adb
Fix #9538 Inventory iocage fails when DHCP is enabled (#9539)
* Fix #9538  Inventory iocage fails when DHCP is enbled.

* Add changelog fragment 9539-iocage-inventory-dhcp.yml

* Keep iocage_ip4 a string.

* Rename the variable iocage_ip4 to iocage_ip4_dict in _parse_ip4.

* Update the changelog fragment.

* Rename _parse_ip4 parameter ip4_addr to ip4.

* Fix changelog frangment present tense.

* If IP is not available set iocage_ip4='-' instead of the empty string.

* Update changelogs/fragments/9539-iocage-inventory-dhcp.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-13 18:08:23 +01:00
Alexei Znamensky d325cfc343
o*: style adjustments (#9526)
* o*: style adjustments

* apply recommendations from review

* Update plugins/modules/one_vm.py

* fix example

* adjustment from review

* Update plugins/modules/one_vm.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-12 13:03:26 +01:00
Alexei Znamensky 3dcac2b030
test helper: adjusted unit tests using new features (#9563) 2025-01-12 17:40:48 +13:00
Alexei Znamensky 568fcea15e
pr*: style adjustments (#9524)
* pr*: style adjustments

* revert removal of "null"

* Update plugins/modules/redfish_command.py

* Update plugins/modules/redhat_subscription.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-08 20:41:03 +01:00
Felix Fontein 3f7ea60766
Use multiple YAML documents for inventory plugin examples (#9551)
* Use multiple YAML documents for inventory plugin examples.

* Add ignore.txt entries.

* Delete no longer needed ignore.txt files.

* Fix typo.

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-01-08 19:37:55 +01:00
Felix Fontein bf69dc46ff
CI: Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel (#9552)
* Add Fedora 41, Alpine 3.21, RHEL 9.5, FreeBSD 14.2 to CI for devel.

* Add some ignores that are likely needed.

* Try to fix/ignore various errors.

* Fix redis setup on Fedora 41.

* Undo disable yum_versionlock since it's already globally disabled.
2025-01-08 18:53:13 +01:00
Hagai Kariti 81ea9f69bf
Add hkariti to notifications ignore list (#9542)
* Add hkariti to notifications ignore list

* Update .github/BOTMETA.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-07 19:00:58 +01:00
Alexei Znamensky 3af793c2c1
plugins (become, callback, filter): style adjustments (#9535)
* plugins (become, callback, filter, inventory): style adjustments

* remove inventory plugins from PR

* adjustments from review

* typo
2025-01-07 06:33:28 +01:00
Alexei Znamensky 8cef0ee551
defghi*: style adjustments (#9532)
* defghi*: style adjustments

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-07 06:30:03 +01:00
Alexei Znamensky 838cdaab42
lmn*: style adjustments (#9528)
* lmn*: style adjustments

* Apply suggestions from code review

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-07 06:28:00 +01:00
Alexei Znamensky aac7199087
(abc*, doc frags): style adjustments (#9534) 2025-01-06 21:50:53 +01:00
Alexei Znamensky 27c34b150f
jk*: style adjustments (#9529)
* jk*: style adjustments

* Apply suggestions from code review

* fix return yamls
2025-01-06 21:31:59 +01:00
Felix Fontein 007302d5af Fix CI badge image URL. Add documentation badge. 2025-01-04 11:24:30 +01:00
Alexei Znamensky d2078be247
uvw*: style adjustments (#9515)
* uvw*: style adjustments

* Apply suggestions from code review

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

* adjustments from review

* Update plugins/modules/utm_proxy_frontend.py

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

* Update plugins/modules/utm_proxy_frontend_info.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-04 11:04:51 +01:00
Alexei Znamensky 7c54c70301
xyz*: style adjustments (#9513) 2025-01-04 12:29:34 +13:00
Alexei Znamensky 33b9ad09d5
s*: style adjustments (#9517)
* s*: style adjustments

* fix quotes

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-03 22:52:09 +01:00
Alexei Znamensky 695b1abc8d
st*: style adjustments (#9516)
* st*: style adjustments

* lien lenght adjustments
2025-01-03 20:00:45 +01:00
Stephan Schwarz d7da0ae7f6
remove stearz as maintainer (#9518)
* remove stearz as maintainer

As I do not work with Sophos UTMs anymore I am no longer able to test/maintain. - I added team_e_spirit as maintainer as I think they are still using and willing to support the modules.

* added ignore lines to remove stearz as maintainer
2025-01-03 19:59:56 +01:00
Alexei Znamensky 103b331a5d
runtime/modules ordering: missed two modules before (#9512) 2025-01-03 10:04:05 +01:00
Paul Fertser e853bdf6f9
Redfish: implement obtaining AccountService config (#9403)
Example result from querying OpenBMC's bmcweb Redfish server:

```
    changed: false
    failed: false
    redfish_facts:
        accountservice_config:
            entries:
                '@odata.id': /redfish/v1/AccountService
                '@odata.type': '#AccountService.v1_15_0.AccountService'
                AccountLockoutDuration: 0
                AccountLockoutThreshold: 0
                Accounts:
                    '@odata.id': /redfish/v1/AccountService/Accounts
                ActiveDirectory:
                    Authentication:
                        AuthenticationType: UsernameAndPassword
                        Password: null
                        Username: ''
                    LDAPService:
                        SearchSettings:
                            BaseDistinguishedNames:
                            - ''
                            GroupsAttribute: ''
                            UsernameAttribute: ''
                    RemoteRoleMapping: []
                    ServiceAddresses:
                    - ''
                    ServiceEnabled: false
                Description: Account Service
                HTTPBasicAuth: Enabled
                HTTPBasicAuth@AllowableValues:
                - Enabled
                - Disabled
                Id: AccountService
                LDAP:
                    Authentication:
                        AuthenticationType: UsernameAndPassword
                        Password: null
                        Username: ''
                    Certificates:
                        '@odata.id': /redfish/v1/AccountService/LDAP/Certificates
                    LDAPService:
                        SearchSettings:
                            BaseDistinguishedNames:
                            - ''
                            GroupsAttribute: ''
                            UsernameAttribute: ''
                    RemoteRoleMapping: []
                    ServiceAddresses:
                    - ''
                    ServiceEnabled: false
                MaxPasswordLength: 20
                MinPasswordLength: 8
                MultiFactorAuth:
                    ClientCertificate:
                        CertificateMappingAttribute: CommonName
                        Certificates:
                            '@odata.id': /redfish/v1/AccountService/MultiFactorAuth/ClientCertificate/Certificates
                            '@odata.type': '#CertificateCollection.CertificateCollection'
                            Members: []
                            Members@odata.count: 0
                        Enabled: true
                        RespondToUnauthenticatedClients: true
                Name: Account Service
                Oem:
                    OpenBMC:
                        '@odata.id': /redfish/v1/AccountService#/Oem/OpenBMC
                        '@odata.type': '#OpenBMCAccountService.v1_0_0.AccountService'
                        AuthMethods:
                            BasicAuth: true
                            Cookie: true
                            SessionToken: true
                            TLS: true
                            XToken: true
                Roles:
                    '@odata.id': /redfish/v1/AccountService/Roles
                ServiceEnabled: true
            ret: true
```

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2025-01-02 16:26:31 +01:00
Alexei Znamensky 655d943dbb
meta/runtime.yml: sort keys for modules (#9506)
* meta/runtime.yml: sort keys for modules

* Update meta/runtime.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-01-01 09:51:37 +01:00
Alexei Znamensky 39deb81514
clc_*: create doc fragment (#9497)
* clc_*: create doc fragment

* add BOTMETA entry

* add doc frag itself

* add empty options dict to doc frag

* fix BOTMETA entry

* fix BOTMETA entry

* move author back to module
2025-01-01 09:14:44 +01:00
Felix Fontein bb12db3c58 The next feature release will be 10.3.0. 2024-12-31 11:48:28 +01:00
Victor Martinez 6e919a4b76
opentelemetry callback plugin: remove unused code (#9503)
* opentelemetry callback plugin: remove unused code

* changelog
2024-12-31 10:44:40 +00:00
Alexei Znamensky 43d5d6e2ce
remove code handling unsupported Python versions (#9496)
* remove code handling unsupported Python versions

* drop unused import

* remove no longer needed ignore lines
2024-12-31 10:37:10 +01:00
Alexei Znamensky 7f3fef3038
fix typo (#9498) 2024-12-31 14:27:21 +13:00
Alexei Znamensky 9aff6109ae
atomic_*: deprecation (#9487) 2024-12-31 12:47:19 +13:00
Felix Fontein 1e28302a66
htpasswd: let changed reflect updated permissions (#9490)
* Let changed reflect updated permissions.

* Make pylint happy.
2024-12-31 12:19:55 +13:00
Philippe Duveau 01244237a1
Optimize ldap modules auth note in a doc fragment (#9486)
Optimize ldap auth doc fragment
2024-12-30 23:39:41 +01:00
Alexei Znamensky d81f56e10b
sensu_*: deprecation (#9483)
* sensu_*: deprecation

* add changelog frag
2024-12-30 23:38:32 +01:00
Alexei Znamensky cd2dbbafcd
opentelemetry callback plugin: remove code for Python < 3.7 (#9482)
* opentelemetry callback plugin: remove code for Python < 3.7

* add changelog frag
2024-12-30 23:06:40 +01:00
Alexei Znamensky 6bb7a1cc73
locale_gen: fix/improvements (#9238)
* locale_gen: fix/improvements

* fix sanity

* add RV doc

* add integration test forcing mechanism=debian

- test is failing

* fix RETURN doc

* reformat yaml

* comment out the test for ubuntu_mode=True

* multiple changes:

- add changelog fragment
- improved docs

* normalize docs after rebasing

* Update changelogs/fragments/9131-locale-gen-rewrite.yml

* apply recommendations from review

* Update plugins/modules/locale_gen.py

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

* Update changelogs/fragments/9238-locale-gen-rewrite.yml

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

* Update plugins/modules/locale_gen.py

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

* Update plugins/modules/locale_gen.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-30 21:54:50 +01:00
Philippe Duveau adb4b3c8a5
Add module ldap inc (#9275)
* Add module ldap_inc

This module adds the ‘modify-increment’ capability corresponding to the extension implemented by OpenLdap described in RFC-4525. It can be used to increment an integer attribute and read it atomically. It is an help for posix userId definition while relying only on the directory server.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>

Update plugins/modules/ldap_inc.py

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

Update plugins/modules/ldap_inc.py

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

Update plugins/modules/ldap_inc.py

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

Fix the check mode support

Check mode documentation fix

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

* Update plugins/modules/ldap_inc.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-30 21:19:10 +01:00
Alexei Znamensky f55899d6ef
svc: adjustments to docs (#9470)
* svc: adjustments to docs

* Update plugins/modules/svc.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-30 19:53:43 +01:00
KBjorndal-VizRT f8bfd5df0d
gitlab_instance_variable: Add support for 'raw' property (#9425)
* gitlab_instance_variable: Add support for 'raw' property

* Changelog fragment

* Add missing punctuation

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

* Add version_added

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-30 12:48:25 +01:00
Alexandre Nicolaie 403418f75d
proxmox_template: fix the wrong path called on proxmox_template.task_status (#9277)
fix: add missing 's' on proxmox_template.task_status

Missing the 's' means using the wrong API, making log reading
impossible. Should fix !9276

Signed-off-by: Alexandre Nicolaie <xunleii@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-30 12:47:49 +01:00
Alexei Znamensky 4a1a8d6b38
pacemaker_cluster: fix run_command() calls (#9471)
* pacemaker_cluster: fix run_command() calls

* add changelog frag

* remove set_node()
2024-12-30 11:49:29 +01:00
Alexei Znamensky 17d36da150
yaml callback plugin: deprecation (#9456)
* yaml callback pulign: deprecation

* add changelog frag

* Update plugins/callback/yaml.py

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

* set removal to 13.0.0

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-29 21:23:42 +01:00
Thomas Sjögren 482a90e8b4
add support for systemd creds encrypt/decrypt (#9383)
* add support for systemd creds encrypt/decrypt

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add __metaclass__

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Python 2.7 issues

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* update version_added and ci test aliases

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* switch to container

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* run tests in docker as well

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* move tasks into tasks/

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* no need to call echo

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* lint and add become:

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* dont append a newline

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* don't clean newlines

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* only use module name

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* clean

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* change msg to value

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* add return values

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* update attributes and description

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/systemd_creds_decrypt.py

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

* set newline default

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/systemd_creds_encrypt.py

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* Update plugins/modules/systemd_creds_encrypt.py

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

* update required and spelling

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* use single backslash

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2024-12-29 21:15:57 +01:00
Alexei Znamensky d887930e49
normalize docs in callback plugins (#9455)
* normalize docs in callback plugins

Normalize doc blocks for plugins

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2024-12-29 20:31:59 +01:00