In meinem Textbuch, ich habe dies:Überprüfen Sie, ob Strings sind equals und ternäre Operator in ansible
#More things
- include: deploy_new.yml
vars:
service_type: "{{ expose_service == 'true' | ternary('NodePort', 'ClusterIP') }}"
when: service_up|failed
Wenn expose_service
wahr ist, ich will service_type
sonst zu "NodePort" und "ClusterIP" gesetzt werden.
In allen Fällen ist service_type
jedoch auf False
eingestellt.
Was mache ich falsch?