blockinfile:

From wikieduonline
Revision as of 18:30, 7 September 2023 by Welcome (talk | contribs) (→‎See also)
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: