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.3.12 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.11 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.10 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.9 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.8 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.7 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.6 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.5 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.4 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.3 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.2 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.3.1 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.88 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.87 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.86 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.85 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.84 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.83 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.82 roles/nrser.blockinfile/tests/test-basic.yml
qb-0.1.81 roles/nrser.blockinfile/tests/test-basic.yml