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 VAR*S }}

- 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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9afefb10-70f2-4547-82d6-0e2a81881a0b%40googlegroups.com.

Reply via email to