mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
improve usage example of tempfile module (#47933)
* Show in example how to use file created by tempfile module
This commit is contained in:
parent
73348ae32d
commit
434c421675
1 changed files with 7 additions and 0 deletions
|
@ -55,6 +55,13 @@ EXAMPLES = """
|
|||
tempfile:
|
||||
state: file
|
||||
suffix: temp
|
||||
register: tempfile_1
|
||||
|
||||
- name: use the registered var and the file module to remove the temporary file
|
||||
file:
|
||||
path: "{{ tempfile_1.path }}"
|
||||
state: absent
|
||||
when: tempfile_1.path is defined
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
|
|
Loading…
Reference in a new issue