---
- name: check | Import accepted values for defined variables
  include_vars:
    name: accepted_vals
    file: ../requirements/assert.yml

- name: check | Defined variable values
  fail:
    msg: Variable `{{ item }}` needs to be 1 of {{ accepted_vals[item] }}
  when: not vars[item] in accepted_vals[item]
  loop: '{{ accepted_vals | flatten }}'

- name: check | Number of defined terminal emulators
  fail:
    msg: Need at least 2 terminal emulators
  when: ( terminal_emulators | length() ) < 2

- name: check | Variable type of umask
  fail:
    msg: Variable 'umask' needs to be a string
  when: not umask is string
