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 ############
---
- hosts: my-computer
remote_user: toto
tasks:
-vars:
- my-first-vars: {{ THIS IS VARS }}
- name: "config host"
lineinfile:
path: /etc/file.cfg
regexp: '(.*)this_to_change_with_vars(.*)'
line: '{{ my-first-vars }}'
########### file.vars #########
THIS IS VARS : 10.10.10.10
THIS IS OTHER VARS: 10.10.9.9