From d679f510182ce4c8e463a78e438fa45507058f3d Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 7 May 2023 21:29:45 +0200 Subject: [PATCH] [PR #6497/4e57240e backport][stable-6] terraform: fix warn() call (#6499) terraform: fix warn() call (#6497) Fix warn() call. (cherry picked from commit 4e57240e9f7e39b73f7669b546bcaa93ea1ae9ac) Co-authored-by: Felix Fontein --- changelogs/fragments/6497-terraform-fix.yml | 2 ++ plugins/modules/terraform.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/6497-terraform-fix.yml diff --git a/changelogs/fragments/6497-terraform-fix.yml b/changelogs/fragments/6497-terraform-fix.yml new file mode 100644 index 0000000000..8b5119722c --- /dev/null +++ b/changelogs/fragments/6497-terraform-fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - "terraform - fix broken ``warn()`` call (https://github.com/ansible-collections/community.general/pull/6497)." diff --git a/plugins/modules/terraform.py b/plugins/modules/terraform.py index bbafad0e9e..554bb48f8b 100644 --- a/plugins/modules/terraform.py +++ b/plugins/modules/terraform.py @@ -315,7 +315,7 @@ def _state_args(state_file): if not state_file: return [] if not os.path.exists(state_file): - module.warn(msg='Could not find state_file "{0}", the process will not destroy any resources, please check your state file path.'.format(state_file)) + module.warn('Could not find state_file "{0}", the process will not destroy any resources, please check your state file path.'.format(state_file)) return ['-state', state_file]