forked from fvzwieten/rbac-demo-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows_deploy_iis.yml
61 lines (51 loc) · 1.32 KB
/
windows_deploy_iis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
# This playbook installs and enables IIS on Windows hosts with php and mysql support
- name: install IIS including php and mysql support
hosts: role_webserver:&windows
vars_files:
files/winrm_vars
tasks:
- name: Install Web-Server
win_feature:
name: Web-Server
state: present
# include_sub_features: yes
# include_management_tools: yes
register: win_feature
- name: Enable firewall
win_firewall:
state: enabled
- name: Firewall rule to allow http on TCP port 80
win_firewall_rule:
name: http
localport: 80
action: allow
direction: in
protocol: tcp
state: present
enabled: yes
- name: install Chocolatey
win_chocolatey:
name: chocolatey
state: present
- name: disable enhanced exit codes
win_chocolatey_feature:
name: useEnhancedExitCodes
state: disabled
- name: install Microsoft Web Platform Installer
win_chocolatey:
name: "{{ item }}"
state: present
loop:
- git
- webpicmd
- lessmsi
- name: install php using Web Platform Installer
win_webpicmd:
name: PHP72
- name: reboot if installing feature requires it
win_reboot:
when: win_feature.reboot_required
- name: Report end points
debug:
msg: "RDP at {{ public_ip }}"