From d344d7863a8c2bbc75bf125d3ef109ee8da24173 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Thu, 1 Dec 2016 14:19:36 +0000 Subject: [PATCH] Native YAML - files (#3608) --- lib/ansible/modules/extras/files/archive.py | 12 +++++++++--- lib/ansible/modules/extras/files/tempfile.py | 12 ++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/ansible/modules/extras/files/archive.py b/lib/ansible/modules/extras/files/archive.py index 36d2c4231b2..7d27fb3e858 100644 --- a/lib/ansible/modules/extras/files/archive.py +++ b/lib/ansible/modules/extras/files/archive.py @@ -63,13 +63,19 @@ notes: EXAMPLES = ''' # Compress directory /path/to/foo/ into /path/to/foo.tgz -- archive: path=/path/to/foo dest=/path/to/foo.tgz +- archive: + path: /path/to/foo + dest: /path/to/foo.tgz # Compress regular file /path/to/foo into /path/to/foo.gz and remove it -- archive: path=/path/to/foo remove=True +- archive: + path: /path/to/foo + remove: True # Create a zip archive of /path/to/foo -- archive: path=/path/to/foo format=zip +- archive: + path: /path/to/foo + format: zip # Create a bz2 archive of multiple files, rooted at /path - archive: diff --git a/lib/ansible/modules/extras/files/tempfile.py b/lib/ansible/modules/extras/files/tempfile.py index 88bdf358de7..35969141fe7 100644 --- a/lib/ansible/modules/extras/files/tempfile.py +++ b/lib/ansible/modules/extras/files/tempfile.py @@ -52,11 +52,15 @@ options: ''' EXAMPLES = """ - - name: create temporary build directory - tempfile: state=directory suffix=build +- name: create temporary build directory + tempfile: + state: directory + suffix: build - - name: create temporary file - tempfile: state=file suffix=temp +- name: create temporary file + tempfile: + state: file + suffix: temp """ RETURN = '''