mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
Windows: Add backup parameter to modules (#50033)
* Windows: Add backup parameter to modules This PR adds a backup infrastructure for modules. * Fixes based on review feedback * Various fixes to check-mode and backup * Add integration tests * Fix win_xml integration test * Add backup support to copy action plugin * Added integration tests * Improve test efficiencies and other minor impv
This commit is contained in:
parent
76b5a9fb52
commit
3d1dd0e599
15 changed files with 365 additions and 95 deletions
|
@ -23,7 +23,7 @@ options:
|
|||
path:
|
||||
description:
|
||||
- The path of remote servers XML.
|
||||
type: str
|
||||
type: path
|
||||
required: true
|
||||
aliases: [ dest, file ]
|
||||
fragment:
|
||||
|
@ -39,7 +39,9 @@ options:
|
|||
required: true
|
||||
backup:
|
||||
description:
|
||||
- Whether to backup the remote server's XML before applying the change.
|
||||
- Determine whether a backup should be created.
|
||||
- When set to C(yes), create a backup file including the timestamp information
|
||||
so you can get the original file back if you somehow clobbered it incorrectly.
|
||||
type: bool
|
||||
default: no
|
||||
type:
|
||||
|
@ -75,6 +77,11 @@ EXAMPLES = r'''
|
|||
'''
|
||||
|
||||
RETURN = r'''
|
||||
backup_file:
|
||||
description: Name of the backup file that was created.
|
||||
returned: if backup=yes
|
||||
type: str
|
||||
sample: C:\Path\To\File.txt.11540.20150212-220915.bak
|
||||
msg:
|
||||
description: What was done.
|
||||
returned: always
|
||||
|
@ -85,9 +92,4 @@ err:
|
|||
returned: always, for type element and -vvv or more
|
||||
type: list
|
||||
sample: attribute mismatch for actual=string
|
||||
backup:
|
||||
description: Name of the backup file, if created.
|
||||
returned: changed
|
||||
type: str
|
||||
sample: C:\config.xml.19700101-000000
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue