1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-03 23:41:51 +00:00
community.general/plugins
Greg Harvey b3c066b99f
Adding scw_profile parameter to Scaleway module utilities. (#11314)
* Adding scw_profile parameter to Scaleway module utilities.

* Setting param name to profile for consistency and adding scw_profile as an alias.

* Adding changelog fragment.

* Forgot to import 'os' library.

* Type in variable type for Scaleway profile.

* Also forgot to include the yaml library, code taking from plugins/inventory/scaleway.py.

* Adding default 'profile' value of empty string and changing check to a length check.

* Treated wrong variable, checking XDG_CONFIG_HOME is a string.

* Explicitly setting default of environment path vars to empty strings instead of None.

* Letting ruff reformat the dict for 'profile'.

* Changes from code review.

* Fixing ruff formatting issue with error message.

* Properly catching PyYAML import issues.

* Adding PyYAML requirement when 'profile' is used.

* Ruff wants an extra line after the PyYAML import code.

* Fixing PyYAML dependency code as per review.

* Removing extraneous var declaration.

* Moving SCW_CONFIG loading to a function.

* Fixing type errors with os.getenv calls.

* Cannot send None to os.path.exists() or open().

* Oops, inversed logic!

* Setting os.getenv() default to empty string so it is never None.

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

* None check no longer needed as scw_config_path is never None.

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2025-12-28 21:03:55 +01:00
..
action Add type hints to action and test plugins and to plugin utils; fix some bugs, and improve input validation (#11167) 2025-11-22 22:52:21 +01:00
become Reformat everything. 2025-11-01 13:46:53 +01:00
cache Use raise from in plugins (#11095) 2025-11-12 20:34:26 +01:00
callback docs: migrate RTD URLs to docs.ansible.com (#11109) 2025-11-19 07:00:51 +01:00
connection Added support for Windows VM with Incus connection. (#11199) 2025-11-29 15:18:02 +01:00
doc_fragments Adding scw_profile parameter to Scaleway module utilities. (#11314) 2025-12-28 21:03:55 +01:00
filter fix ruff case UP031 (#11223) 2025-11-29 08:28:22 +01:00
inventory Adding support for the Scaleway SCW_PROFILE environment variable. (#11311) 2025-12-28 21:03:20 +01:00
lookup fix ruff case UP030 (#11189) 2025-11-23 08:37:41 +01:00
module_utils Adding scw_profile parameter to Scaleway module utilities. (#11314) 2025-12-28 21:03:55 +01:00
modules fix: listen_ports_facts return no facts when using with podman (#11332) 2025-12-28 21:02:31 +01:00
plugin_utils Add type hints to action and test plugins and to plugin utils; fix some bugs, and improve input validation (#11167) 2025-11-22 22:52:21 +01:00
test Add type hints to action and test plugins and to plugin utils; fix some bugs, and improve input validation (#11167) 2025-11-22 22:52:21 +01:00