using variable from another file

Hello, I would like to know the syntax that would allow me to retrieve the contents of a file and use it to make a variable in a new file in my example I have my YAML configuration file and I have a VARIABLE file and I do not know how to get my first line and make it a variable in my 1st file

############ config.yml ############

See:

https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#defining-variables-in-files

Sebastian

thanks for this, but if i come here it’s for get help, i already read the doc




So Sebastian did provide the answer and help :wink:

Hint: read the vars_files in the the provided links

Phil