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

1985 commits

Author SHA1 Message Date
Kevin Carter
2eba5dc4e7
chore: Update lxc_container to support py3 (#5304)
* 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>
2022-10-01 18:02:48 +02:00
azrdev
202cabc769
terraform: run init with no-color, too (#5147)
* 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
2022-10-01 10:25:12 +02:00
Giorgio Gallo
ec9e10d6d1
nmcli: fix error when setting previously unset mac address (#5291)
* fix #5290

* add changelog fragment

* remove unnecessary braces

* Update changelogs/fragments/5291-fix-nmcli-error-when-setting-unset-mac-address.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-28 22:49:07 +02:00
nxet
25e3031c2f
[feat] proxmox_snap: snapshot containers with configured mountpoints (#5274)
* 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>
2022-09-28 22:48:11 +02:00
Ben Brown
f3bcfa5a75
machinectl: include the success command (#5287)
Combines the success command when building the become command. This is
consistent with other become plugins.
2022-09-25 21:09:08 +02:00
tejabailey
d9d830a168
Add SetSessionService to redfish_config (#5009)
* 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>
2022-09-25 17:07:45 +02:00
Bartosz-lab
fb1cf91ebd
locale_gen: fix UbuntuMode (#5282)
* Fix UbuntuMode

* Fix indentation

* Create 5281-locale_gen.yaml

* Update and rename 5281-locale_gen.yaml to 5282-locale_gen.yaml

* apply suggested changes

* apply suggested change
2022-09-25 16:31:32 +02:00
Alexei Znamensky
f0ee21b8b2
ini_file: fix lint error (#5307)
* ini_file: fix lint error

* add changelog fragment

* remove line from sanity test ignore files
2022-09-25 16:28:06 +02:00
Marc Leuser
a6c8078ccf
netcup_dnsapi: Add timeout paramter (#5301)
* netcup_dnsapi: Add timeout paramter

* add changelog fragment

* Apply suggestions from code review

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

* remove unnecessary newline

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-22 07:17:45 +02:00
Felix Fontein
cfecbd6763 stable-2.14 is now default. 2022-09-22 06:40:15 +02:00
Felix Fontein
a938c9de65
Add stable-2.14 to CI, adjust to devel version bump (#5298)
* Add stable-2.14 to CI, adjust to devel version bump.

* Thin out matrix a bit.
2022-09-21 07:58:52 +02:00
Felix Fontein
44e85c3a60
Try to run reuse workflow without explicitly allowing it for new contributors. (#5296) 2022-09-19 21:07:04 +02:00
castorsky
7777b48c99
New module: Proxmox disk management (#5101)
* New module: Proxmox disk management

* Remove misplaced option

* Type missed

* Fixed docs, quotes, 2.7 syntax

* Forgotten comma

* Version added 5.5.0

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

* Italic options

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

* Missed dot

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

* Pythonify python

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

* Shorten command

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

* Action parameter drop. General improvements.

* Add proxmox_disk integration testing

* Shorten getting vmid

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

* Code tag for value

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

* Italic tag for option

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

* Definite ID of the VM

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

* Docs edit and loop condition

* Simplify conditions

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

* Dropped bps options, added idempotency checks

* Documentaion edit

* Rewrite create/import condition

* Trainling comma

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

* Added type field to all choosable arguments

* Description of disk bus ranges

* Fix imports

* Update version

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

* Lowercase YAML boolean

* Rename grown to resized and update documentation

* Documentation updated before actual changes

* Added 'update' flag for 'present' state

* Traling space

* YAML indentation

* Merged 'updated' option into 'present'.

* Doc update.

* Exclude 'import_from' on update

* Version bump

* yaml boolean lowercase

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

* yaml boolean lowercase

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

* More detailed description

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>
2022-09-18 22:06:21 +02:00
Alexei Znamensky
35e3a9615a
pipx module utils: removed unused import (#5288) 2022-09-18 11:52:15 +02:00
Felix Fontein
59d43becef Next expected release is 5.7.0. 2022-09-13 13:10:41 +02:00
sprnza
b5d311a171
slack: add CP channel prefix (#5249)
* add CP channel prefix

* changelog added

* altered docs

* added description for docs change

* fix line length

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update plugins/modules/notification/slack.py

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

* Update changelogs/fragments/5249-add-new-channel-prefix.yml

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

Co-authored-by: Денис Сперанский <d_speranskiy@head-point.ru>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-12 20:32:14 +02:00
Yvan Watchman
19e4b7d3ab
add a couple conditionals to make sure updating can be done with vmid… (#5206)
* 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>
2022-09-12 20:31:30 +02:00
Alexei Znamensky
fbb6ceea1d
gitlab_hook: minor refactoring (#5271)
* gitlab_hook: minor refactoring

* add changelog fragment
2022-09-12 20:30:49 +02:00
Alexei Znamensky
6b463e6fa6
gitlab modules: improved imports (#5259)
* gitlab modules: improved imports

* add changelog fragment

* refactored the import check to its sole function
2022-09-12 20:30:02 +02:00
Felix Fontein
5470ea30dc
Fix changelogs killed by GitHub. (#5272) 2022-09-10 12:24:14 +02:00
Felix Fontein
b371bd6a5b
Fix pkgng tests (#5266)
* Now there are problems with 13.0 as well. But maybe 13.1 works again?

* 13.1 still does not work, maybe 13.2 will (not yet available in CI)...
2022-09-10 11:29:19 +02:00
Alexei Znamensky
0a85bb7d23
multiple modules: removed unused imports (#5258) 2022-09-10 11:19:14 +02:00
Felix Fontein
dde0b55f1a
Restrict Python packages for nomad tests. (#5262) 2022-09-10 11:08:13 +02:00
Shaul Shnaidman
33059a807c
changed the default proxmox container unprivileged flag (#5224)
* changed the default proxmox container to unprivileged

* Reverted the default value with a deprecation.

* use true/false instead of yes/no

* Update plugins/modules/cloud/misc/proxmox.py

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

* Apply suggestions from code review

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

* param -> parameter

* Apply suggestions from code review

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

* fix

* review

* Update changelogs/fragments/5224-proxmox-unprivileged-default.yaml

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>
2022-09-10 10:53:08 +02:00
Pavel Zwerschke
f929422dac
osx_defaults: add expand_user_and_vars flag to write (#5243)
* Add expand_user_and_vars flag to write

Closes #5234

* Add changelog

* Update changelogs/fragments/5243-osx-defaults-expand-user-flags.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-10 10:52:14 +02:00
Alexei Znamensky
775be1d3f3
multiple modules: removed unused imports (#5240)
* multiple modules: removed unused imports

* fixed ali_instance(_info) import check

* add changelog fragment

* Update changelogs/fragments/5240-unused-imports.yaml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-09 22:23:48 +02:00
Dawid Dziurla
be9acc7fba
homebrew: add Linux brew path to defaults (#5241)
* 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>
2022-09-08 07:46:10 +02:00
betuxy
b4f89b78dd
nmcli: Add xmit_hash_policy to bond options. (#5149)
* Add xmit_hash_policy to nmcli bond-options.

* #5149 - Add changelog fragment.

* Update plugins/modules/net_tools/nmcli.py

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

* Update changelogs/fragments/5149-nmcli-bond-option.yml

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

Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-08 07:45:23 +02:00
Chih-Hsuan Yen
946c48d148
nmcli: honor IP options for VPNs (#5228)
* nmcli: honor IP options for VPNs

This can be used for split tunneling - I extended a test as an example.

* Add changelog
2022-09-08 07:44:54 +02:00
Felix Fontein
015566fb06
Normalize more booleans. (#5247) 2022-09-06 20:42:17 +02:00
Alexei Znamensky
570445adc4
nagios: some refactoring (#5239)
* nagios: some refactoring

* rollback one change

* add changelog fragment

* Update changelogs/fragments/5239-nagios-refactor.yaml

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

* Update plugins/modules/monitoring/nagios.py

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

* Update plugins/modules/monitoring/nagios.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:33:55 +02:00
Alexei Znamensky
88c3865cdb
Multiple doc fix 3 (#5238)
* multiple modules 2: fixed markups in doc

* multiple modules 3: fixed markups in doc

* fixed yaml

* Update plugins/modules/cloud/misc/proxmox_template.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:32:35 +02:00
Alexei Znamensky
999fc475a2
multiple modules 2: fixed markups in doc (#5237)
* multiple modules 2: fixed markups in doc

* Update plugins/modules/cloud/misc/proxmox_template.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-06 07:31:25 +02:00
Alexei Znamensky
6e011f00f4
multiple modules: fixed markups in doc (#5227) 2022-09-04 15:25:34 +02:00
Alexei Znamensky
ac8b034061
ali_instance: fixed markups in doc (#5226)
* ali_instance: fixed markups in doc

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

* Update plugins/modules/cloud/alicloud/ali_instance.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-04 15:23:02 +02:00
Alexei Znamensky
a481f8356e
ipwcli_dns: fixed markups in doc (#5225)
* ipwcli_dns: fixed markups in doc

* added punctuation
2022-09-04 15:21:44 +02:00
Mike Moerk
2a449eb163
WDC Redfish support for setting the power mode. (#5145)
* 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>
2022-09-03 12:45:03 +02:00
wilfriedroset
feabe20c63
consul: add support for session token (#5193)
Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>

Signed-off-by: Wilfried Roset <wilfriedroset@users.noreply.github.com>
2022-09-03 12:17:54 +02:00
PKehnel
36a7939962
Bugfix - EnvironmentError with wrong indentation (#5202)
* 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>
2022-09-03 12:04:42 +02:00
Chih-Hsuan Yen
6ff594b524
nmcli: avoid changed status for most cases with VPN connections (#5126)
* 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
2022-09-03 12:02:03 +02:00
Alexei Znamensky
7ffe6539c0
New module: pipx_info (#5196)
* pipx_info: new module

* pipx_info: add integration tests

* ensure apps are uninstalled after tests

* Update plugins/modules/packaging/language/pipx_info.py

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

* rework module output, add docs

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 12:00:04 +02:00
Petr Lautrbach
4c52fdb9d9
seport: add local argument (#5203)
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>
2022-09-03 11:53:57 +02:00
tylerezimmerman
86f4d798a9
Update BOTMETA.yml (#5165)
* Update BOTMETA.yml

Removing Endlesstrax and Amigus as maintainers.

* Update .github/BOTMETA.yml

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

* Update BOTMETA.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-09-03 11:34:06 +02:00
Felix Fontein
fa49051912
Catch more broader error messages. (#5212) 2022-09-03 11:25:41 +02:00
Markus Reiter
82d69bb871
Fix exception when agent argument is not specified. (#5194) 2022-08-28 12:03:27 +02:00
Felix Fontein
8e59e52525
[TEMP] Fix RHEL 8 issues by restricting bcrypt to < 4.0.0 (#5183) 2022-08-25 07:30:28 +02:00
Felix Fontein
8027bc5335
filesystem: create temp directory outside /tmp to avoid problems with tmpfs. (#5182) 2022-08-25 06:43:07 +02:00
jixj5
766c109d47
Update redfish module for compatibility with VirtualMedia resource location (#5124)
* 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>
2022-08-24 21:36:35 +02:00
Felix Fontein
57e1e2bd8e
Fix indent. (#5177) 2022-08-24 20:47:06 +02:00
Felix Fontein
3a08903e1c
Adjust booleans in cloud modules. (#5155) 2022-08-24 20:16:25 +02:00