[stable-2.18] meta: Avoid traceback when retrieving the meta task name (#85371)

Fixes: #85367

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
pull/85454/head
Abhijeet Kasurde 5 months ago committed by GitHub
parent f7a38d1df0
commit 21f9b1a3a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,3 @@
---
bugfixes:
- meta - avoid traceback when retrieving the meta task name (https://github.com/ansible/ansible/issues/85367).

@ -137,9 +137,8 @@ class Task(Base, Conditional, Taggable, CollectionSearch, Notifiable, Delegatabl
def __repr__(self):
''' returns a human-readable representation of the task '''
if self.action in C._ACTION_META:
return "TASK: meta (%s)" % self.args['_raw_params']
else:
return "TASK: %s" % self.get_name()
return "TASK: meta (%s)" % self.args.get('_raw_params')
return "TASK: %s" % self.get_name()
def _preprocess_with_loop(self, ds, new_ds, k, v):
''' take a lookup plugin name and store it correctly '''

Loading…
Cancel
Save