mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Added executable parameter to the script module (#36969)
* Added interpreter parameter to the script module * Let required and default parameters get documented implicitly for binary parameter * Renamed interpreter parameter to executable
This commit is contained in:
parent
43ca9d1548
commit
04e3c964fb
4 changed files with 43 additions and 1 deletions
|
@ -40,6 +40,10 @@ options:
|
|||
description:
|
||||
- cd into this directory on the remote node before running the script
|
||||
version_added: "2.4"
|
||||
executable:
|
||||
description:
|
||||
- Name or path of a executable to invoke the script with
|
||||
version_added: "2.6"
|
||||
notes:
|
||||
- It is usually preferable to write Ansible modules than pushing scripts. Convert your script to an Ansible module for bonus points!
|
||||
- The ssh connection plugin will force pseudo-tty allocation via -tt when scripts are executed. pseudo-ttys do not have a stderr channel and all
|
||||
|
@ -66,4 +70,14 @@ EXAMPLES = '''
|
|||
- script: /some/local/remove_file.sh --some-arguments 1234
|
||||
args:
|
||||
removes: /the/removed/file.txt
|
||||
|
||||
# Run a script using a executable in a non-system path
|
||||
- script: /some/local/script
|
||||
args:
|
||||
executable: /some/remote/executable
|
||||
|
||||
# Run a script using a executable in a system path
|
||||
- script: /some/local/script.py
|
||||
args:
|
||||
executable: python3
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue