Saturday 2 March 2019

find and replace the content in all files in a folder ansible

- name: find and replace the content in all files in a folder ansible
replace:
path: "{{ item.src }}"
regexp: 'export KAFKA_HEAP_OPTS="-Xmx512M"'
replace: 'export KAFKA_HEAP_OPTS="-Xmx128M"'
with_filetree: "{{ kafka_installation_dir }}/{{ kafka_version }}/bin/"
when: item.state == 'file'

No comments:

Post a Comment