diff options
author | Dave Johnson <djohnson@Daves-MacBook-Pro.local> | 2015-08-06 16:41:07 +0300 |
---|---|---|
committer | Dave Johnson <djohnson@Daves-MacBook-Pro.local> | 2015-08-06 16:41:07 +0300 |
commit | bcee7d38ee58a3d74bdc57651543003e4fba1145 (patch) | |
tree | 4234f918864b31d27d9f20b42597754e5bfe532e /windows | |
parent | 401547991db4ed74c712618c9f8b0d2f3d4640a1 (diff) |
Updated the windows playbooks
Diffstat (limited to 'windows')
-rw-r--r-- | windows/create-user.yml | 10 | ||||
-rw-r--r-- | windows/deploy-site.yml | 2 | ||||
-rw-r--r-- | windows/install-msi.yml | 15 | ||||
-rw-r--r-- | windows/ping.yml | 2 | ||||
-rw-r--r-- | windows/run-powershell.yml | 2 | ||||
-rw-r--r-- | windows/test.yml | 13 |
6 files changed, 29 insertions, 15 deletions
diff --git a/windows/create-user.yml b/windows/create-user.yml new file mode 100644 index 0000000..09ce6be --- /dev/null +++ b/windows/create-user.yml @@ -0,0 +1,10 @@ +--- +- name: Add a user + hosts: all + gather_facts: false + tasks: + - name: Add User + win_user: + name: ansible + password: "@ns1bl3" + state: present diff --git a/windows/deploy-site.yml b/windows/deploy-site.yml index 70114f6..6963fd0 100644 --- a/windows/deploy-site.yml +++ b/windows/deploy-site.yml @@ -2,7 +2,7 @@ # This playbook uses the win_get_url module to download a simple HTML file for IIS - name: Download simple web site - hosts: windows + hosts: all gather_facts: false tasks: - name: Download simple web site to 'C:\inetpub\wwwroot\ansible.html' diff --git a/windows/install-msi.yml b/windows/install-msi.yml new file mode 100644 index 0000000..897b994 --- /dev/null +++ b/windows/install-msi.yml @@ -0,0 +1,15 @@ +--- +- name: Install Apache from an MSI + hosts: all + + tasks: + - name: Download the Apache installer + win_get_url: + url: 'http://mirror.cc.columbia.edu/pub/software/apache//httpd/binaries/win32/httpd-2.2.25-win32-x86-no_ssl.msi' + dest: 'C:\Users\Administrator\Downloads\httpd-2.2.25-win32-x86-no_ssl.msi' + + - name: Install MSI + win_msi: + path: 'C:\Users\Administrator\Downloads\httpd-2.2.25-win32-x86-no_ssl.msi' + state: present + diff --git a/windows/ping.yml b/windows/ping.yml index 15cba8d..62f4707 100644 --- a/windows/ping.yml +++ b/windows/ping.yml @@ -1,7 +1,7 @@ --- # This playbook uses the win_ping module to test connectivity to Windows hosts - name: Ping - hosts: windows + hosts: all tasks: - name: ping diff --git a/windows/run-powershell.yml b/windows/run-powershell.yml index 4e1efc9..683c7e9 100644 --- a/windows/run-powershell.yml +++ b/windows/run-powershell.yml @@ -2,7 +2,7 @@ # This playbook tests the script module on Windows hosts - name: Run powershell script - hosts: windows + hosts: all gather_facts: false tasks: - name: Run powershell script diff --git a/windows/test.yml b/windows/test.yml index b347a6f..fa416f2 100644 --- a/windows/test.yml +++ b/windows/test.yml @@ -1,8 +1,6 @@ --- -# This playbook uses various Windows modules to test their functionality - - name: test raw module - hosts: windows + hosts: all tasks: - name: run ipconfig raw: ipconfig @@ -25,12 +23,3 @@ - "not stat_file.stat.isdir" - "stat_file.stat.size > 0" - "stat_file.stat.md5" - -- name: Add a user - hosts: all - gather_facts: false - tasks: - - name: Add User - win_user: - name: ansible - password: "@ns1bl3" |