diff --git a/changelogs/fragments/3940_fix_contenttype_scaleway_user_data.yml b/changelogs/fragments/3940_fix_contenttype_scaleway_user_data.yml new file mode 100644 index 0000000000..97d97b67c1 --- /dev/null +++ b/changelogs/fragments/3940_fix_contenttype_scaleway_user_data.yml @@ -0,0 +1,2 @@ +bugfixes: + - scaleway_user_data - fix double-quote added where no double-quote is needed to user data in scaleway's server (``Content-type`` -> ``Content-Type``) (https://github.com/ansible-collections/community.general/pull/3940). diff --git a/plugins/modules/cloud/scaleway/scaleway_user_data.py b/plugins/modules/cloud/scaleway/scaleway_user_data.py index 2a468a1734..2848ec2c4a 100644 --- a/plugins/modules/cloud/scaleway/scaleway_user_data.py +++ b/plugins/modules/cloud/scaleway/scaleway_user_data.py @@ -75,7 +75,7 @@ def patch_user_data(compute_api, server_id, key, value): compute_api.module.debug("Starting patching user_data attributes") path = "servers/%s/user_data/%s" % (server_id, key) - response = compute_api.patch(path=path, data=value, headers={"Content-type": "text/plain"}) + response = compute_api.patch(path=path, data=value, headers={"Content-Type": "text/plain"}) if not response.ok: msg = 'Error during user_data patching: %s %s' % (response.status_code, response.body) compute_api.module.fail_json(msg=msg)