summaryrefslogtreecommitdiff
path: root/windows/win_file.py
diff options
context:
space:
mode:
authorSam Doran <sdoran@ansible.com>2016-11-22 11:07:21 -0500
committerJohn R Barker <john@johnrbarker.com>2016-11-22 16:07:21 +0000
commit99de7f02cd10dab087842246d6c038720942337e (patch)
tree0b26196e50e3c4b65621acfcb159cb1a6ece549f /windows/win_file.py
parentbb901bbfcc8edaa9a2da3a17d661658845e18762 (diff)
downloadansible-modules-core-99de7f02cd10dab087842246d6c038720942337e.tar.gz
Examples syntax batch7 (#5624)
* Change example syntax on nxos_feature module * Change example syntax on nxos_hsrp module * Change example syntax on nxos_igmp module * Change example syntax on nxos_interface module * Change example syntax on nxos_interface_ospf module * Change example syntax on nxos_ip_interface module * Change example syntax on nxos_ping module * Change example syntax on nxos_switchport module * Change example syntax on nxos_vlan module * Change example syntax on nxos_vrf module * Change example syntax on nxos_vrf_interface module * Change example syntax on nxos_vrrp module * Change example syntax on meta module * Change example syntax on set_fact module * Change example syntax on win_copy module * Change example syntax on win_file module * Change example syntax on win_get_url module Remove escaping of \ characeter in Windows paths since it's no longer required for single quoted or unquoted values when using multi-line YAML syntax. * Change example syntax on win_lineinfile module * Change example syntax on win_msi module * Change example syntax on win_stat module * Remove nxos_bgp example from nxos_igmp module * Mark examples as regexp to avoid syntax error * Cleanup win_copy.py examples * Cleanup win_file.py examples * Remove quotes in win_get_url.py examples * Cleanup quotes and languare in win_lineinfile.py * Cleanup examples in win_group.py * Cleanup examples in win_service.py * Don't use : in documentation because it breaks the YAML syntax check * Cleanup win_copy.py examples * Cleanup win_copy.py examples * Minor change to fix test failure * Use single quotes
Diffstat (limited to 'windows/win_file.py')
-rw-r--r--windows/win_file.py34
1 files changed, 22 insertions, 12 deletions
diff --git a/windows/win_file.py b/windows/win_file.py
index 895da567..989c128e 100644
--- a/windows/win_file.py
+++ b/windows/win_file.py
@@ -46,27 +46,37 @@ options:
If C(file), the file will NOT be created if it does not exist, see the M(copy)
or M(template) module if you want that behavior. If C(absent),
directories will be recursively deleted, and files will be removed.
- If C(touch), an empty file will be created if the c(path) does not
+ If C(touch), an empty file will be created if the C(path) does not
exist, while an existing file or directory will receive updated file access and
- modification times (similar to the way `touch` works from the command line).
+ modification times (similar to the way C(touch) works from the command line).
required: false
default: file
choices: [ file, directory, touch, absent ]
'''
EXAMPLES = '''
-# create a file
-- win_file: path=C:\\temp\\foo.conf
+- name: Create a file
+ win_file:
+ path: C:\temp\foo.conf
+ state: file
-# touch a file (creates if not present, updates modification time if present)
-- win_file: path=C:\\temp\\foo.conf state=touch
+- name: Touch a file (creates if not present, updates modification time if present)
+ win_file:
+ path: C:\temp\foo.conf
+ state: touch
-# remove a file, if present
-- win_file: path=C:\\temp\\foo.conf state=absent
+- name: Remove a file, if present
+ win_file:
+ path: C:\temp\foo.conf
+ state: absent
-# create directory structure
-- win_file: path=C:\\temp\\folder\\subfolder state=directory
+- name: Create directory structure
+ win_file:
+ path: C:\temp\folder\subfolder
+ state: directory
-# remove directory structure
-- win_file: path=C:\\temp state=absent
+- name: Remove directory structure
+ win_file:
+ path: C:\temp
+ state: absent
'''