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?