mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
improve usage example of tempfile module (#47933)
* Show in example how to use file created by tempfile module
This commit is contained in:
committed by
Alicia Cozine
parent
73348ae32d
commit
434c421675
@@ -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 = '''
|
||||
|
||||
Reference in New Issue
Block a user