additional course material RH294
Student User
2020-02-19 8b862483000e30613e2079356141ed730015d306
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$"