In my playbook, I have this:
#More things
- include: deploy_new.yml
vars:
service_type: "{{ expose_service == 'true' | ternary('NodePort', 'ClusterIP') }}"
when: service_up|failed
When expose_service
is true, I want service_type
to be set to NodePort, and ClusterIP otherwise.
However, service_type
is set to False
in all cases.
What am I doing wrong?