win_ansible_role_obs_setup/tasks/autologon.yml

12 lines
473 B
YAML
Raw Normal View History

2022-01-01 21:53:30 +01:00
---
2022-12-28 17:29:41 +01:00
- name: Fail if win_obs_init__autologon_password unset
2022-01-01 21:53:30 +01:00
ansible.builtin.fail:
msg: "Please define a password for 'win_obs_init__autologon_password'!"
when: win_obs_init__autologon_password == 'pleaseDefine'
- name: "Set autologon for {{ win_obs_init__autologon_user }}"
community.windows.win_auto_logon:
username: "{{ win_obs_init__autologon_user }}"
password: "{{ win_obs_init__autologon_password }}"
state: "{{ win_obs_init__autologon_state }}"