mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 21:07:21 +00:00
30 lines
694 B
YAML
30 lines
694 B
YAML
---
|
|
- name: Check User Action is valid
|
|
ansible.builtin.assert:
|
|
that:
|
|
- user_action is defined
|
|
- user_action is string
|
|
- user_action is in valid_actions
|
|
quiet: true
|
|
|
|
- name: Check User information
|
|
block:
|
|
- name: Check Username
|
|
ansible.builtin.assert:
|
|
that:
|
|
- username is defined
|
|
- username is string
|
|
- username is not none
|
|
- username|length <= 20
|
|
quiet: true
|
|
|
|
- name: Check User Info [CREATE]
|
|
ansible.builtin.assert:
|
|
that:
|
|
- password is defined
|
|
- firstname is defined
|
|
- lastname is defined
|
|
quiet: true
|
|
when: user_action == 'create'
|
|
|