1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Native YAML - files (#3608)

This commit is contained in:
Fabio Alessandro Locati 2016-12-01 14:19:36 +00:00 committed by Matt Clay
parent 47442b7c22
commit d344d7863a
2 changed files with 17 additions and 7 deletions

View file

@ -63,13 +63,19 @@ notes:
EXAMPLES = ''' EXAMPLES = '''
# Compress directory /path/to/foo/ into /path/to/foo.tgz # 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 # 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 # 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 # Create a bz2 archive of multiple files, rooted at /path
- archive: - archive:

View file

@ -53,10 +53,14 @@ options:
EXAMPLES = """ EXAMPLES = """
- name: create temporary build directory - name: create temporary build directory
tempfile: state=directory suffix=build tempfile:
state: directory
suffix: build
- name: create temporary file - name: create temporary file
tempfile: state=file suffix=temp tempfile:
state: file
suffix: temp
""" """
RETURN = ''' RETURN = '''