You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/win_auto_logon/tasks/main.yml

37 lines
1.1 KiB
YAML

# Copyright: (c) 2019, Prasoon Karunan V (@prasoonkarunan) <kvprasoon@Live.in>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
---
- name: Set autologon registry keys
win_auto_logon:
username: "{{ ansible_user }}"
password: "{{ ansible_password }}"
state: present
register: win_auto_logon_create_registry_key_set
- name: check win_auto_logon_create_registry_key_set is changed
assert:
that:
- win_auto_logon_create_registry_key_set is changed
- name: Set autologon registry keys with missing input
win_auto_logon:
username: "{{ ansible_user }}"
state: present
register: win_auto_logon_create_registry_key_missing_input
ignore_errors: true
- name: check win_auto_logon_create_registry_key_missing_input is failed
assert:
that:
- win_auto_logon_create_registry_key_missing_input is failed
- name: Remove autologon registry keys
win_auto_logon:
state: absent
register: win_auto_logon_create_registry_key_remove
- name: check win_auto_logon_create_registry_key_remove is changed
assert:
that:
- win_auto_logon_create_registry_key_remove is changed