diff options
Diffstat (limited to 'lib/ansible/modules/tempfile.py')
-rw-r--r-- | lib/ansible/modules/tempfile.py | 9 |
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 }}" |