My playbook evaluates in the when
clause a variable that is input from Survey on Ansible Automation Platform, but i now i get Conditional is marked as unsafe
code:
task
- name: Creating user on CentOS7 ( with wheel )
ansible.builtin.user:
name: "{{ user }}"
password: "{{ passwd | password_hash('sha512') }}"
shell: "{{ user_shell }}"
append: yes
state: present
comment: Created by Ansible
group: "{{ user }}"
groups: wheel
when: ansible_distribution == "CentOS" and "{{ root }}" == "yes"
Reference:
https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_9.html