Check if strings are equals and ternary operator in Ansible June 11, 2023 by Tarik Solved! service_type: "{{ 'NodePort' if expose_service == 'true' else 'ClusterIP' }}"