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

1114 commits

Author SHA1 Message Date
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
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
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
Alexei Znamensky
0a85bb7d23
multiple modules: removed unused imports (#5258) 2022-09-10 11:19:14 +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
Markus Reiter
82d69bb871
Fix exception when agent argument is not specified. (#5194) 2022-08-28 12:03:27 +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
Felix Fontein
403c4f7477
Adjust booleans in misc modules. (#5160) 2022-08-24 20:00:26 +02:00
Felix Fontein
7533f9ac26
Adjust booleans in net tools, web infrastructure, and clustering modules. (#5159) 2022-08-24 20:00:11 +02:00
Felix Fontein
675bdef190
Adjust booleans in source control modules. (#5158) 2022-08-24 19:59:56 +02:00
Felix Fontein
35a283918a
Adjust booleans in notification modules. (#5157) 2022-08-24 19:59:46 +02:00
Felix Fontein
1b480e9f37
Adjust booleans in monitoring modules. (#5156) 2022-08-24 19:59:30 +02:00
Felix Fontein
ddc989ec6d
Adjust booleans in packaging modules. (#5154) 2022-08-24 19:59:13 +02:00
Felix Fontein
be2de15c66
Adjust booleans in system modules (#5153)
* Adjust booleans in system modules.

* Fix some IP addresses

Co-authored-by: Sandra McCann <samccann@redhat.com>

Co-authored-by: Sandra McCann <samccann@redhat.com>
2022-08-24 19:59:01 +02:00
Jonathan Lung
ad8965218d
Fix nsupdate when updating NS record (#5112)
* Fix nsupdate when updating NS record

* Changelog fragment

* Update changelogs/fragments/5112-fix-nsupdate-ns-entry.yaml

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

* Switch to fallback to AUTHORITY instead of using with NS type.

* Update plugins/modules/net_tools/nsupdate.py

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

* Update plugins/modules/net_tools/nsupdate.py

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

Co-authored-by: jonathan lung <lungj@heresjono.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-20 13:22:13 +02:00
Markus Reiter
0be7b6e7b9
Change Proxmox agent argument to string. (#5107)
* Change Proxmox `agent` argument to string.

* Add changelog entry.

* Pass boolean directly to `proxmoxer`.
2022-08-20 13:21:07 +02:00
Alexei Znamensky
3c960ac620
pipx: add state latest (#5105)
* pipx: add state latest

* add changelog fragment

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

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-18 06:44:18 +02:00
Felix Fontein
a54af8909c
Fix linting errors; fix some real bugs (#5111)
* Fix linting errors.

* Fix bugs.

* Another linter error ignored.

* More fixes.

* Ignore sanity errors with older versions.

ci_complete

* Forgot to commit more changes.
2022-08-12 11:07:30 +02:00
Markus Reiter
0338eb7a7c
Fix Proxmox node, name condition. (#5108)
* Fix Proxmox `node`, `name` condition.

* Add changelog entry.
2022-08-12 14:03:57 +12:00
Alexei Znamensky
83317419d7
pipx: add required_if fo upgrade and reinstall (#5100)
* pipx: add required_if for upgrade and reinstall

* add changelog fragment
2022-08-09 10:15:51 +02:00
Felix Fontein
aab22e7f32
Add remaining copyright statements, add licenses sanity test (#5098)
* Add sanity test (currently fails).

* doc_fragments can also be non-GPLv3+.

* Replace 'Author:' by 'Copyright:' in some specific cases.

* Avoid matching string for license checkers.

* Reformulate not to throw license detection off.

* Add PSF copyright notice for plugins/module_utils/_mount.py.

* Add generic copyright notices.

* Update changelog fragment.
2022-08-08 23:23:08 +02:00
Felix Fontein
424d706f92
Fix more copyright lines, add more default copyright lines (#5095)
* Fix copyright lines.

* Add default copyright line.
2022-08-08 14:24:58 +02:00
Alexei Znamensky
2ecaa91f68
pipx: use CmdRunner (#5085)
* pipx: use CmdRunner

* added BOTMETA entry for pipx module_utils

* add changelog fragment

* add missing line

* Update plugins/module_utils/pipx.py

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

* Update plugins/module_utils/pipx.py

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-08-08 08:02:56 +02:00
Felix Fontein
2a9fd7359f
Add more license statements (#5079)
* Add more license statements. These were modified manually incorporating existing data.

* Remove accidentally added line.
2022-08-07 13:37:23 +02:00