From 7a14cb61c40102ae271474576bc142f73bfb6530 Mon Sep 17 00:00:00 2001 From: jeromew Date: Fri, 17 Jan 2014 08:14:25 +0000 Subject: [PATCH] Add creates= and removes= to the script: action --- lib/ansible/runner/action_plugins/script.py | 53 ++++++++++++++++++++- library/commands/script | 18 +++++++ 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/action_plugins/script.py b/lib/ansible/runner/action_plugins/script.py index 6b584c15b63..67b0cac9f0d 100644 --- a/lib/ansible/runner/action_plugins/script.py +++ b/lib/ansible/runner/action_plugins/script.py @@ -16,6 +16,7 @@ # along with Ansible. If not, see . import os +import re import shlex import ansible.constants as C @@ -38,12 +39,60 @@ class ActionModule(object): # in check mode, always skip this module return ReturnData(conn=conn, comm_ok=True, result=dict(skipped=True, msg='check mode not supported for this module')) + # extract ansible reserved parameters + # From library/command keep in sync + creates = None + removes = None + r = re.compile(r'(^|\s)(creates|removes)=(?P[\'"])?(.*?)(?(quote)(?