mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix script module document (#42778)
script module seems does not create / remove files it seems only checks file existence or not existence +label: docsite_pr
This commit is contained in:
parent
1651483e44
commit
34c582287a
1 changed files with 4 additions and 4 deletions
|
@ -30,11 +30,11 @@ options:
|
||||||
required: true
|
required: true
|
||||||
creates:
|
creates:
|
||||||
description:
|
description:
|
||||||
- a filename, when it already exists, this step will B(not) be run.
|
- a filename on remote, when it already exists, this step will B(not) be run.
|
||||||
version_added: "1.5"
|
version_added: "1.5"
|
||||||
removes:
|
removes:
|
||||||
description:
|
description:
|
||||||
- a filename, when it does not exist, this step will B(not) be run.
|
- a filename on remote, when it does not exist, this step will B(not) be run.
|
||||||
version_added: "1.5"
|
version_added: "1.5"
|
||||||
chdir:
|
chdir:
|
||||||
description:
|
description:
|
||||||
|
@ -61,12 +61,12 @@ EXAMPLES = '''
|
||||||
# Example from Ansible Playbooks
|
# Example from Ansible Playbooks
|
||||||
- script: /some/local/script.sh --some-arguments 1234
|
- script: /some/local/script.sh --some-arguments 1234
|
||||||
|
|
||||||
# Run a script that creates a file, but only if the file is not yet created
|
# Run a script only if the file does not exists
|
||||||
- script: /some/local/create_file.sh --some-arguments 1234
|
- script: /some/local/create_file.sh --some-arguments 1234
|
||||||
args:
|
args:
|
||||||
creates: /the/created/file.txt
|
creates: /the/created/file.txt
|
||||||
|
|
||||||
# Run a script that removes a file, but only if the file is not yet removed
|
# Run a script only if the file exists
|
||||||
- script: /some/local/remove_file.sh --some-arguments 1234
|
- script: /some/local/remove_file.sh --some-arguments 1234
|
||||||
args:
|
args:
|
||||||
removes: /the/removed/file.txt
|
removes: /the/removed/file.txt
|
||||||
|
|
Loading…
Add table
Reference in a new issue