Hi,
I have two register variable in a play and want to replace one with another in a play.
Hi,
I have two register variable in a play and want to replace one with another in a play.
The way your are doing it seems ok, except you are formating it wrong
either use this form:
- name: Editing the file
replace: dest=/some/path regexp=^"{{ result.stdout }}."
replace="{{ result2.stdout }}." backup=yes
or this one:
- name: Editing the file
replace:
dest: /some/path
regexp: ^"{{ result.stdout }}."
replace: "{{ result2.stdout }}."
backup: yes