+

Search Tips   |   Advanced Search

ansible.builtin.script - Runs a local script on a remote node after transferring it

This module is part of ansible-base and included in all Ansible installations. In most cases, you can use the short module name script even without specifying the collections: keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.

New in version 0.9: of ansible.builtin


Synopsis

This module has a corresponding action plugin.


Parameters

Parameter Choices/Defaults Comments

chdir

string

Change into this directory on the remote node before running the script.

cmd

string

Path to the local script to run followed by optional arguments.

creates

string

A filename on the remote node, when it already exists, this step will not be run.

decrypt

boolean

  • no

  • yes ←

This option controls the autodecryption of source files using vault.

executable

string

Name or path of a executable to invoke the script with.

free_form

string

Path to the local script file followed by optional arguments.

removes

string

A filename on the remote node, when it does not exist, this step will not be run.



Notes


See Also


See also

ansible.builtin.shell

The official documentation on the ansible.builtin.shell module.

ansible.windows.win_shell

The official documentation on the ansible.windows.win_shell module.


Examples


Authors