win_ansible_role_obs_setup/tasks/autologon.yml
2022-01-01 22:02:26 +01:00

11 lines
473 B
YAML

---
- name: fail if win_obs_init__autologon_password unset
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 }}"