Sha256: 4176a30e5c9cbca2c4f4920a62df6def948cb0c897adda9793cedf234b098152

Contents?: true

Size: 987 Bytes

Versions: 90

Compression:

Stored size: 987 Bytes

Contents

- hosts: localhost
  vars:
    - testing_dir: "{{playbook_dir}}/testing"
  roles:
    - yaegashi.blockinfile
  tasks:
    - name: insert block
      blockinfile: |
        dest={{testing_dir}}/insert.txt backup=yes
        content="aaa bbb ccc\nAAA BBB CCC"
    - name: update block
      blockinfile: |
        dest={{testing_dir}}/update.txt backup=yes
        content="aaa bbb ccc\nAAA BBB CCC"
    - name: remove block
      blockinfile: |
        dest={{testing_dir}}/remove.txt backup=yes
        content=""
    - 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

Version Path
qb-0.1.80 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.79 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.78 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.77 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.76 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.75 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.74 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.73 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.72 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.71 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.70 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.69 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.68 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.67 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.66 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.65 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.64 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.63 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.62 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.61 roles/nrser.blockinfile/tests/test-basic.yml