blockinfile:

From wikieduonline
Jump to navigation Jump to search


- blockinfile:
     path: /path/to/your_file
     state: present
     insertafter: EOF
     content: | 
          your first line
          your second line 
          your third line


- blockinfile: |
    dest=/etc/network/interfaces backup=yes
    content="iface eth0 inet static
        address 192.168.0.1
        netmask 255.255.255.0"


Related

See also

Advertising: