* 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>
(cherry picked from commit 2eba5dc4e7)
Co-authored-by: Kevin Carter <kevin@cloudnull.com>
* 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
(cherry picked from commit 202cabc769)
Co-authored-by: azrdev <azrdev@qrdn.de>
Combines the success command when building the become command. This is
consistent with other become plugins.
(cherry picked from commit f3bcfa5a75)
Co-authored-by: Ben Brown <ben@demerara.io>
* 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>
(cherry picked from commit d9d830a168)
Co-authored-by: tejabailey <33755314+tejabailey@users.noreply.github.com>
* 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>
(cherry picked from commit 19e4b7d3ab)
Co-authored-by: Yvan Watchman <ik@yvanwatchman.eu>
* gitlab modules: improved imports
* add changelog fragment
* refactored the import check to its sole function
(cherry picked from commit 6b463e6fa6)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* 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>
(cherry picked from commit f929422dac)
Co-authored-by: Pavel Zwerschke <pavelzw@gmail.com>
* 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>
(cherry picked from commit be9acc7fba)
Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
* nmcli: honor IP options for VPNs
This can be used for split tunneling - I extended a test as an example.
* Add changelog
(cherry picked from commit 946c48d148)
Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com>
* 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>
(cherry picked from commit 2a449eb163)
Co-authored-by: Mike Moerk <michael.moerk@wdc.com>
* 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
(cherry picked from commit 6ff594b524)
Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com>
* 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>
(cherry picked from commit 36a7939962)
Co-authored-by: PKehnel <ga65coy@mytum.de>
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>
(cherry picked from commit 4c52fdb9d9)
Co-authored-by: Petr Lautrbach <plautrba@redhat.com>
* 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>
(cherry picked from commit 766c109d47)
Co-authored-by: jixj5 <66418293+jixj5@users.noreply.github.com>
* 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>
(cherry picked from commit be2de15c66)
* feat: Add crc32 filter
Compute CRC32 checksum of a string and return its hex representation. Can be
use to create short checksums.
Signed-off-by: Julien Riou <julien@riou.xyz>
* Update license lines
* Improve string check of a crc32 value
Signed-off-by: Julien Riou <julien@riou.xyz>
Signed-off-by: Julien Riou <julien@riou.xyz>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8e9ec610c3)
Co-authored-by: Julien Riou <julien@riou.xyz>