From e6e689d341ec702a0a6ce19835f2815dc748c47f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 7 May 2023 20:57:54 +0200 Subject: [PATCH] terraform: fix warn() call (#6497) Fix warn() call. (cherry picked from commit 4e57240e9f7e39b73f7669b546bcaa93ea1ae9ac) --- 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 00000000000..8b5119722c6 --- /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 bbafad0e9ee..554bb48f8bc 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]