* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
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>
* 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>