update voc
This commit is contained in:
parent
c3a8c3ab35
commit
04e6d2d4c8
2 changed files with 11 additions and 3 deletions
3
defaults/main.yml
Normal file
3
defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
win__special_rdp_user: 'voc'
|
||||||
|
win__allow_special_rdp_user: false
|
|
@ -11,9 +11,9 @@
|
||||||
changed_when: _a.changed
|
changed_when: _a.changed
|
||||||
|
|
||||||
- name: Touch a file (creates if not present, updates modification time if present)
|
- name: Touch a file (creates if not present, updates modification time if present)
|
||||||
ansible.windows.win_file:
|
ansible.windows.win_copy:
|
||||||
path: .ansible\status\rdp.txt
|
dest: .ansible\status\rdp.txt
|
||||||
state: touch
|
content: 'Ansible opened RDP on this host'
|
||||||
register: _a
|
register: _a
|
||||||
|
|
||||||
# https://exchangepedia.com/2016/10/enable-remote-desktop-rdp-connections-for-admins-on-windows-server-2016.html
|
# https://exchangepedia.com/2016/10/enable-remote-desktop-rdp-connections-for-admins-on-windows-server-2016.html
|
||||||
|
@ -37,3 +37,8 @@
|
||||||
profiles: private
|
profiles: private
|
||||||
state: present
|
state: present
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
- name: "Allow RDP for User {{ win__special_rdp_user }}"
|
||||||
|
ansible.windows.win_powershell:
|
||||||
|
script: 'Add-LocalGroupMember -Group "Remote Desktop Users" -Member {{ win__special_rdp_user }}'
|
||||||
|
when: win__allow_special_rdp_user | bool
|
||||||
|
|
Loading…
Reference in a new issue