summaryrefslogtreecommitdiffstats
path: root/lib/ansible/modules/tempfile.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:16:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:16:49 +0000
commit48e387c5c12026a567eb7b293a3a590241c0cecb (patch)
tree80f2573be2d7d534b8ac4d2a852fe43f7ac35324 /lib/ansible/modules/tempfile.py
parentReleasing progress-linux version 2.16.6-1~progress7.99u1. (diff)
downloadansible-core-48e387c5c12026a567eb7b293a3a590241c0cecb.tar.xz
ansible-core-48e387c5c12026a567eb7b293a3a590241c0cecb.zip
Merging upstream version 2.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/ansible/modules/tempfile.py')
-rw-r--r--lib/ansible/modules/tempfile.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/ansible/modules/tempfile.py b/lib/ansible/modules/tempfile.py
index c5fedab..03176a4 100644
--- a/lib/ansible/modules/tempfile.py
+++ b/lib/ansible/modules/tempfile.py
@@ -4,8 +4,7 @@
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-from __future__ import absolute_import, division, print_function
-__metaclass__ = type
+from __future__ import annotations
DOCUMENTATION = '''
@@ -68,6 +67,12 @@ EXAMPLES = """
suffix: temp
register: tempfile_1
+- name: Create a temporary file with a specific prefix
+ ansible.builtin.tempfile:
+ state: file
+ suffix: txt
+ prefix: myfile_
+
- name: Use the registered var and the file module to remove the temporary file
ansible.builtin.file:
path: "{{ tempfile_1.path }}"