additional course material RH294
Student User
2020-02-20 67b9520a2490b9894fea1a76b98e4f5c2226b62f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
- name: demo blockinfile
  hosts: server
  become: true
  vars:
    installstate: present
  tasks:
    - name: "copy some lines into /etc/profile"
      blockinfile:
        path: /etc/profile
        block: |
          #This is a
          #phantastic
          #block using
          #ansible
          #blockinfile
        marker: "# {mark} OLAFS SUPER BLOCK"
        state: '{{ installstate }}'
        insertbefore: "^unset i$"