mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -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
3
test/integration/targets/script/files/no_shebang.py
Normal file
3
test/integration/targets/script/files/no_shebang.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
import sys
|
||||
|
||||
sys.stdout.write("Script with shebang omitted")
|
|
@ -221,3 +221,21 @@
|
|||
that:
|
||||
- _check_mode_test3 is skipped
|
||||
- '_check_mode_test3.msg == "{{ output_dir_test | expanduser }}/afile2.txt does not exist, matching removes option"'
|
||||
|
||||
# executable
|
||||
|
||||
- name: Run script with shebang omitted
|
||||
script: no_shebang.py
|
||||
args:
|
||||
executable: python
|
||||
register: _shebang_omitted_test
|
||||
tags:
|
||||
- noshebang
|
||||
|
||||
- name: Assert that script with shebang omitted succeeded
|
||||
assert:
|
||||
that:
|
||||
- _shebang_omitted_test is success
|
||||
- _shebang_omitted_test.stdout == 'Script with shebang omitted'
|
||||
tags:
|
||||
- noshebang
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue