diff options
author | Phil <schwartzmx@gmail.com> | 2015-06-22 18:51:58 -0500 |
---|---|---|
committer | Phil <schwartzmx@gmail.com> | 2015-06-23 07:40:14 -0500 |
commit | 03ce40a62ebb1d8ceb8d2f6f7bebb1b4b90458c0 (patch) | |
tree | d3ef79dca63f1a31649113aa2e78f20accc2a53c /windows/win_unzip.py | |
parent | 92744ef5581d108eba3e17d539fc810de2a36e5f (diff) | |
download | ansible-modules-extras-03ce40a62ebb1d8ceb8d2f6f7bebb1b4b90458c0.tar.gz |
removes restart functionality, and added creates param for idempotency
Diffstat (limited to 'windows/win_unzip.py')
-rw-r--r-- | windows/win_unzip.py | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/windows/win_unzip.py b/windows/win_unzip.py index 2c3c41df..7c5ac322 100644 --- a/windows/win_unzip.py +++ b/windows/win_unzip.py @@ -63,16 +63,11 @@ options: - yes - no aliases: [] - restart: + creates: description: - - Restarts the computer after unzip, can be useful for hotfixes such as http://support.microsoft.com/kb/2842230 (Restarts will have to be accounted for with wait_for module) - choices: - - true - - false - - yes - - no - required: false - default: false + - If this file or directory exists the specified src will not be extracted. + required: no + default: null aliases: [] author: Phil Schwartz ''' @@ -88,6 +83,7 @@ $ ansible -i hosts -m win_unzip -a "src=C:\\LibraryToUnzip.zip dest=C:\\Lib rm=t win_unzip: src: "C:\Users\Phil\Logs.bz2" dest: "C:\Users\Phil\OldLogs" + creates: "C:\Users\Phil\OldLogs" # This playbook example unzips a .zip file and recursively decompresses the contained .gz files and removes all unneeded compressed files after completion. --- @@ -102,31 +98,6 @@ $ ansible -i hosts -m win_unzip -a "src=C:\\LibraryToUnzip.zip dest=C:\\Lib rm=t recurse: yes rm: true -# Install hotfix (self-extracting .exe) ---- -- name: Install WinRM PowerShell Hotfix for Windows Server 2008 SP1 - hosts: all - gather_facts: false - tasks: - - name: Grab Hotfix from URL - win_get_url: - url: 'http://hotfixv4.microsoft.com/Windows%207/Windows%20Server2008%20R2%20SP1/sp2/Fix467402/7600/free/463984_intl_x64_zip.exe' - dest: 'C:\\463984_intl_x64_zip.exe' - - name: Unzip hotfix - win_unzip: - src: "C:\\463984_intl_x64_zip.exe" - dest: "C:\\Hotfix" - recurse: true - restart: true - - name: Wait for server reboot... - local_action: - module: wait_for - host={{ inventory_hostname }} - port={{ansible_ssh_port|default(5986)}} - delay=15 - timeout=600 - state=started - # Install PSCX to use for extracting a gz file - name: Grab PSCX msi win_get_url: |