Sha256: 6c2c7c108dc698ff4feaa782af0fcc3219c84f8ff83230d703b9923864efdd6d
Contents?: true
Size: 1.42 KB
Versions: 90
Compression:
Stored size: 1.42 KB
Contents
- hosts: localhost gather_facts: false vars: testing_dir: "{{playbook_dir}}/testing" beginmarker: | {{ '#' * 78 }} # BEGIN MULTILINE SECTION # endmarker: | # # END MULTILINE SECTION {{ '#' * 78 }} blah: null roles: - yaegashi.blockinfile tasks: - name: insert block blockinfile: | dest={{testing_dir}}/insert.txt backup=yes content="aaa bbb ccc\nAAA BBB CCC" beginmarker="{{ beginmarker }}" endmarker="{{ endmarker }}" - name: remove block blockinfile: | dest={{testing_dir}}/remove.txt backup=yes content="" beginmarker="{{ beginmarker }}" endmarker="{{ endmarker }}" - name: update block blockinfile: | dest={{testing_dir}}/update.txt backup=yes content="aaa bbb ccc\nAAA BBB CCC" beginmarker="{{ beginmarker }}" endmarker="{{ endmarker }}" # - name: alternative marker # blockinfile: | # dest={{testing_dir}}/marker.txt backup=yes # marker="<!-- {mark} ANSIBLE MANAGED BLOCK -->" # content="<h2>aaa bbb ccc</h2>\n<h2>AAA BBB CCC</h2>" # - name: create a file, with options in a hash # blockinfile: # dest: "{{testing_dir}}/create.txt" # create: yes # content: | # iface eth0 inet static # address 192.168.0.1 # netmask 255.255.255.0
Version data entries
90 entries across 90 versions & 1 rubygems