Reputation: 31
I have a 2 VM's with hostnames
bishkek-01
bishkek-02
and and i have 2 config files which named
bishkek-01.cfg
bishkek-02.cfg
and how to copy for example bishkek-01.cfg to bishkek-01 and bishkek-02.cfg to bishkek-02 vm? using group vars
Upvotes: 0
Views: 925
Reputation: 4284
you can use copy module like this
- name: Copying the config file to remote machine
copy:
src: {{ inventory_hostname }}.cfg
dest: <Your destination goes here>
Upvotes: 3