On Thu, 5 Mar 2015, Craig White wrote:

Seems that the 'script' module wants a local file but I need the local file
to be a template with variables ./templates/my_script.sh

# Run script which removes the directory
- name: perform OpenLDAP setup and clean up
 script: /tmp/slapd/add_ldifs.sh removes=/tmp/slapd

but this doesn't work because /tmp/slapd/add_ldifs.sh is created from the
template and exists on the remote and is not local.
templates/add_ldifs.sh.j2 is local

Is there a way I can do this or do I just resort to running the shell
script that I already have on the remote?

It would be nice to have an action plugin for the script module that is activated when e.g. template=yes is added. And which would subsequently template the script.

(Or we could decide to always template when script is used ?)

--
Dag

Reply via email to