diff --git a/changelogs/fragments/server_error_deprecated_image.yml b/changelogs/fragments/server_error_deprecated_image.yml new file mode 100644 index 0000000..6f19325 --- /dev/null +++ b/changelogs/fragments/server_error_deprecated_image.yml @@ -0,0 +1,2 @@ +bugfixes: + - hcloud_server - TypeError when trying to use deprecated image with allow_deprecated_image diff --git a/plugins/modules/hcloud_server.py b/plugins/modules/hcloud_server.py index 5f966e6..43c6518 100644 --- a/plugins/modules/hcloud_server.py +++ b/plugins/modules/hcloud_server.py @@ -516,8 +516,8 @@ class AnsibleHcloudServer(Hcloud): available_until = image.deprecated + timedelta(days=90) if self.module.params.get("allow_deprecated_image"): self.module.warn( - "You try to use a deprecated image. The image %s will continue to be available until %s.") % ( - image.name, available_until.strftime('%Y-%m-%d')) + "You try to use a deprecated image. The image %s will continue to be available until %s." % ( + image.name, available_until.strftime('%Y-%m-%d'))) else: self.module.fail_json( msg=("You try to use a deprecated image. The image %s will continue to be available until %s." +