Skip to content

Commit

Permalink
Fix Policy and WoW64 settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdonadio committed Jun 20, 2018
1 parent 20e934f commit d2fcd28
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 24 deletions.
21 changes: 14 additions & 7 deletions tasks/windows/disable.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
---
- name: remove enforcement of uniform proxy settings for all user accounts
win_regedit:
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Sabsent
name: ProxySettingsPerUser
state: absent

- name: remove legacy proxy settings
win_regedit:
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
name: "{{ item }}"
path: HKLM:\SOFTWARE{{ item.0 }}\Microsoft\Windows\CurrentVersion\Internet Settings
name: "{{ item.1.name }}"
state: absent
with_items:
- ProxySettingsPerUser
- ProxyEnable
- ProxyServer
- ProxyOverride
with_nested:
- - ""
- \WOW6432Node
- - name: ProxyEnable
- name: ProxyServer
- name: ProxyOverride

- name: remove updated applications proxy settings
win_dsc:
Expand Down
41 changes: 24 additions & 17 deletions tasks/windows/enable.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
---
- name: enforce uniform proxy settings for all user accounts
win_regedit:
path: HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings
name: ProxySettingsPerUser
type: dword
data: 0
state: present

- name: configure legacy applications to use the system proxy
win_regedit:
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
name: "{{ item.name }}"
type: "{{ item.type }}"
data: "{{ item.data }}"
path: HKLM:\SOFTWARE{{ item.0 }}\Microsoft\Windows\CurrentVersion\Internet Settings
name: "{{ item.1.name }}"
type: "{{ item.1.type }}"
data: "{{ item.1.data }}"
state: present
with_items:
- name: ProxySettingsPerUser
type: dword
data: 0
- name: ProxyEnable
type: dword
data: 1
- name: ProxyServer
type: string
data: "{{ 'socks=' if 'socks' in proxy_proto else '' }}{{ proxy_address }}:{{ proxy_port }}"
- name: ProxyOverride
type: multistring
data: "{{ (proxy_whitelist + ['<local>']) | join(';') }}"
with_nested:
- - ""
- \WOW6432Node
- - name: ProxyEnable
type: dword
data: 1
- name: ProxyServer
type: string
data: "{{ 'socks=' if 'socks' in proxy_proto else '' }}{{ proxy_address }}:{{ proxy_port }}"
- name: ProxyOverride
type: string
data: "{{ (proxy_whitelist + ['<local>']) | join(';') }}"

- name: configure updated applications to use the system proxy
win_dsc:
Expand Down

0 comments on commit d2fcd28

Please sign in to comment.