How to bypass (Conditional is marked as unsafe)

The condition contains an embedded template ({{ root }}). Bare variables are already templated, so to fix you should remove the brackets and encapsulate the whole conditional in quotation marks:

when: 'ansible_distribution == "CentOS" and root == "yes"'

5 Likes