summaryrefslogtreecommitdiff
path: root/zuul/ansible
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-03-30 00:23:52 +0000
committerGerrit Code Review <review@openstack.org>2022-03-30 00:23:52 +0000
commitc0075f51bade23b75e000435e1fffa441e00e492 (patch)
tree3646f598fc7c9aa19a8ae0228802d2baa98cc9e9 /zuul/ansible
parent24a478b80b5f2735468b0b5ce11a1c8c2c5e696f (diff)
parent07ae92e174698dd53c826999528ed77ef185030a (diff)
downloadzuul-c0075f51bade23b75e000435e1fffa441e00e492.tar.gz
Merge "Add zuul_log_id to fully qualified command Ansible module args"5.2.1
Diffstat (limited to 'zuul/ansible')
-rw-r--r--zuul/ansible/base/action/command.py4
-rw-r--r--zuul/ansible/base/actiontrusted/command.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/zuul/ansible/base/action/command.py b/zuul/ansible/base/action/command.py
index bf2debc96..c229bfd2b 100644
--- a/zuul/ansible/base/action/command.py
+++ b/zuul/ansible/base/action/command.py
@@ -27,7 +27,9 @@ class ActionModule(command.ActionModule):
# we need the zuul_log_id on shell and command tasks
host = paths._sanitize_filename(task_vars.get('inventory_hostname'))
- if self._task.action in ('command', 'shell'):
+ if self._task.action in (
+ 'command', 'shell',
+ 'ansible.builtin.command', 'ansible.builtin.shell'):
self._task.args['zuul_log_id'] = "%s-%s" % (self._task._uuid, host)
return super(ActionModule, self).run(tmp, task_vars)
diff --git a/zuul/ansible/base/actiontrusted/command.py b/zuul/ansible/base/actiontrusted/command.py
index f9b976ca0..52202bff9 100644
--- a/zuul/ansible/base/actiontrusted/command.py
+++ b/zuul/ansible/base/actiontrusted/command.py
@@ -23,7 +23,9 @@ class ActionModule(command.ActionModule):
def run(self, tmp=None, task_vars=None):
# we need the zuul_log_id on shell and command tasks
host = paths._sanitize_filename(task_vars.get('inventory_hostname'))
- if self._task.action in ('command', 'shell'):
+ if self._task.action in (
+ 'command', 'shell',
+ 'ansible.builtin.command', 'ansible.builtin.shell'):
self._task.args['zuul_log_id'] = "%s-%s" % (self._task._uuid, host)
return super(ActionModule, self).run(tmp, task_vars)