--- # Required input with no default: the role does not read a global such as system_type; # the inventory maps it onto system_baseline_system_type. - name: Require system_baseline_system_type ansible.builtin.assert: that: - system_baseline_system_type is defined fail_msg: >- system_baseline_system_type is required and has no default. Set it in the play or the inventory. tags: always - name: Validate system_baseline_system_type variable ansible.builtin.assert: that: - system_baseline_system_type in ['ubuntu_vm', 'ubuntu_lxc', 'pve'] fail_msg: "system_baseline_system_type '{{ system_baseline_system_type }}' is invalid. Must be: ubuntu_vm, ubuntu_lxc, pve." success_msg: "system_baseline_system_type '{{ system_baseline_system_type }}' is valid." tags: always