mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* fix scaleway_user_data
scaleway_user_data put cloud-init valuer with 2 unexpected " (begin and end of value)
If Content-Type is not change , it's jsonify ( file module_utils/scaleway.py ligne 131 )
fix the probleme when "Content-Type" is used instead of "Content-type"
* Create 3940_fix_contenttype_scaleway_user_data.yml
* Update changelogs/fragments/3940_fix_contenttype_scaleway_user_data.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 043b407412
)
Co-authored-by: pmangin <96626847+pmangin@users.noreply.github.com>
This commit is contained in:
parent
fe5ad997c1
commit
991c96615c
2 changed files with 3 additions and 1 deletions
|
@ -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).
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue