ssl.wrap_socket() was removed in Python 3.12 (#7542)
* ssl.wrap_socket() was removed in Python 3.12.
* Make code for irc module backwards-compatible.
(cherry picked from commit 21cd65fccf)
Co-authored-by: Felix Fontein <felix@fontein.de>
Support 1Password Connect (#5588) (#7116)
* Support 1Password Connect (#5588)
- Support 1Password Connect with the opv2 client
* Follow pep8, be less explicit
* Update changelog to include PR
* 1Password Connect host and token are now also parameters
* Get argument values from the environment or lookup arguments
* Move imports
* Force using Connect token and host at the same time
* Update unit tests
* Update documentation
* Additional tests
(cherry picked from commit f8652571f7)
Co-authored-by: Xeryus Stokkel <XeryusTC@users.noreply.github.com>
Close elastic APM client to release connections (#7517)
* Close elastic APM client to release connections
* Changelog fragment
(cherry picked from commit 8d886b42ec)
Co-authored-by: Iuri de Silvio <iurisilvio@gmail.com>
Netcup DNS: Add support for additional record types (#7489)
* Netcup DNS: Add support for additional record types
* Netcup DNS: Add changelog fragment
* Netcup DNS: Include information on minimum required versions in module documentation
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f8d8f691bc)
Co-authored-by: buzz-tee <11776936+buzz-tee@users.noreply.github.com>
infiniband and bond interfaces can receive MTU settings too (#7499)
* infiniband and bond interfaces can receive MTU settings too
* adding test for default mtu setting
* the mtu parameter for infiniband is different than for ethernet
* adding changelog fragment
* Update changelogs/fragments/7499-allow-mtu-setting-on-bond-and-infiniband-interfaces.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d0870a022e)
Co-authored-by: mark-tomich <tomichms@nih.gov>
feat(gitlab_runner module): Add support for the new runner creation workflow (#7199)
feat(gitlab_runner module): Handle new runner creation workflow
(cherry picked from commit 6b00b76f32)
Co-authored-by: Léo GATELLIER <26511053+lgatellier@users.noreply.github.com>
Improve performance of the bitwarden lookup plugin (#7468)
* Improve performance of the bitwarden lookup plugin
When looking for items using an item id, we can access the item directly with
bw get item instead of searching through all items. This doubles the lookup
speed.
* Update changelogs/fragments/bitwarden-lookup-performance.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix indentation
* Ensure backwards compatible behavior in case of errors when doing bitwarden lookup by id
* chore: Link to correct PR in changelog fragment
* Use identity check when comparing with None
---------
Co-authored-by: Richard Klose <richard.klose@gec.io>
Co-authored-by: Richard Klose <richard@klose.dev>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 65f58afbd9)
Co-authored-by: Pascal Hofmann <mail@pascalhofmann.de>
[ssh_config] Add support for ControlMaster (#7456)
* [ssh_config] Add support for ControlMaster
* Create separate function to convert bool
* Allow str values with yes/no options to also use bool
(cherry picked from commit c2f08c57e0)
Co-authored-by: Marcel <maleo@google.com>
Add options for password generation in the passwordstore module (#7426)
* feat: Add options for password generation.
* feat: Add documentations for options for password generation.
* fix: Remove newline from the end of the stored raw password
* fix: Define 'msg' variable before the reference inside the condition block
* feat: Add information when the 'timestamp' parameter was added
Co-authored-by: Felix Fontein <felix@fontein.de>
* feat: Add information when the 'preserve' parameter was added
Co-authored-by: Felix Fontein <felix@fontein.de>
* feat: Add changelog fragment for adding new parameters to the 'passwordstore' module
* feat: Change the evaluation of password modification conditions.
* feat: Change version of parameter 'timestamp' from 8.0.0 to 8.0.1
Co-authored-by: Felix Fontein <felix@fontein.de>
* feat: Change version of parameter 'preserve' from 8.0.0 to 8.0.1
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: Remove newline character from the timestamp message
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix: Add newline character to the end of 'preserve' message.
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Michal Drobny <494056@muni.cz>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6a514b6843)
Co-authored-by: Michal Drobny <70282353+drobnymichal@users.noreply.github.com>
add template option to proxmox and proxmox_kvm (#7143)
* add template option to proxmox and proxmox_kvm
* make recommended updates
* fix tests
* resolve comments on PR
* save changes to changelog fragment
* Update changelogs/fragments/7143-proxmox-template.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Eric Trombly <etrombly@iomaxis.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 07a47c047b)
Co-authored-by: Eric Trombly <etrombly@yahoo.com>
Use isinstance() instead of type() (#7501)
* Replace type comparisons with isinstance() checks.
* Add changelog.
(cherry picked from commit 48e860be20)
Co-authored-by: Felix Fontein <felix@fontein.de>
fix vm removal in proxmox_pool_member.py (#7464)
* fix vm removal in proxmox_pool_member.py
in the original the vm doesn't get removed, always errors with "'Failed to delete a member (12345) from the pool TestPool: list.remove(x): x not in list'
* add changelog fragment
* fix linting errors in changelog
(cherry picked from commit 0304989392)
Co-authored-by: aungvari <12872375+aungvari@users.noreply.github.com>
* pass the working_dir to all composer command invocations that are not global
* add changelog fragment
* Update changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* plugins/module_utils/lxd: add server_cert_file and server_check_hostname params to LXDClient class
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/inventory/lxd: add server_cert and server_check_hostname options
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* Add changelog fragment
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
---------
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/connection/lxd: convert FQDN to instance name
This allows to use FQDNs in the inventory and have the
connection driver do the translation when talking to
LXD that uses hostnames (no ".") for instance names.
Those are either globally unique or unique per network/
project in LXD.
```
all:
# Groups and hosts
children:
lxd_dmz:
vars:
ansible_lxd_project: dmz
hosts:
www01.dmz.example.com:
www02.dmz.example.com:
```
```
$ lxc list --project dmz
+---------+---------+----------------+------+-----------+-----------+----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+-------+---------+------------------+------+-----------+-----------+----------+
| www01 | RUNNING | 192.0.2.1 (eth0) | | CONTAINER | 0 | t1 |
+-------+---------+------------------+------+-----------+-----------+----------+
| www02 | RUNNING | 192.0.2.2 (eth0) | | CONTAINER | 0 | t3 |
+-------+---------+------------------+------+-----------+-----------+----------+
```
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/connection/lxd: VMs/containers are called instances
Update error string parsing to support the new format:
$ lxc stop c1 -- true
$ lxc exec c1 -- true
Error: Instance is not running
$ lxc exec does-not-exist -- true
Error: Instance not found
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/connection/lxd: add changelog fragment
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
---------
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* Stopped container error test
* Handle remote_addr change
Detect if the remote_addr option changed, and properly "reconnect" aka
update the internal state of the plugin instance.
* Add changelog fragment
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix callback/selective task print being long
Compare against all text on the line rather than simply the task_name var,
which does not include 3 formatting characters in the string
* Add changelog fragment
---------
Co-authored-by: Aidan Houck <AidanHouck@users.noreply.github.com>
* Drop support for ansible-core 2.11 and 2.12.
Also move ansible-core 2.13 from regular CI to EOL CI.
* Remove some compatibility code.
* Remove no longer needed import.
* Update README.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
subscription-manager 1.29.32 renames the "type" D-Bus registration
option to "consumer_type"; this means that the right option must be
passed according to the distro type & version.
Copy the same approach done for environments, tweaking the version
needed: this change is found in RHEL 9.2+ and supported Fedora versions.
Reported-by: Radek Bíba <rbiba@redhat.com>
* Remove disable_facts from xfconf module.
* Remove deprecated module_helper CmdMixin and users.
* Deprecate ArgFormat as well, which wasn't explicitly deprecated yet.
* Remove state=get from gconftool2.
* Remove default of access_level in gitlab_runner.
* Remove state=list from manageiq_polices.
* Remove state=list from manageiq_tags.
* Consul: when state=absent, certain options can no longer be specified.
* Remove support for Ansible 2.9 and ansible-base 2.10 from ansible_galaxy_install.
* Bump community.general version to 8.0.0.
* Fix gconftool2 tests.
* Remove mh.mixins.cmd module_utils completely.
* Re-add removed anchor on its first non-removed usage.
* remove references in return doc, refactor method _setup210plus
* remove no longer needed check in function parse_check
* improve expression
* Fix YAML.
* Lint.
---------
Co-authored-by: Alexei Znamensky <russoz@gmail.com>
* Fixture for liblxc
Add a fixture to allow testing the lxc connection plugin both with and
without liblxc being present.
Also change the test from unittest to pytest.
* Update liblxc error message
The error is not specific to python2, so remove the version. Also add
a test for it.
* Migrate to options
Because the lxc plugin was only using PlayContext properties, using host
vars like `ansible_lxc_host` didn't work. This is fixed by instead using
the `get_option` method inherited from `AnsiblePlugin`.
The options are not yet available in the `__init__` function, so the
determination of the container name is moved to the `_connect` method,
which is the first time it is actually needed.
The default for the `remote_addr` option is removed, because the string
`inventory_hostname` is not very useful. At all. This seams to have been
spread with copy&paste and a bit of cargo culting. The variable priority
already takes care of setting the value.
* Add changelog fragment
* Fix for Py2.7
`TypeError: super() takes at least 1 argument (0 given)`
* Add plugin type to changelog fragment.
* Restore untemplated default
This partially reverts commit 429d8c8cfb.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>