Given this Ansible playbook:
- name: CI/CD management, via cidre.io
hosts: 127.0.0.1
connection: local
vars:
cidre_version: "{{ lookup('file', '../VERSION') | default('v0.1.0') }}"
roles:
- role1
- role2
I understand everytime I use cidre_version variable, Ansible read VERSION file, hence value is dynamic and can change across tasks.
How can I freeze this value when playbook starts?