Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Replace
- hosts: test
- tasks:
- - name: "Ansible Lineinfile Multiple Lines"
- become: yes
- become_user: root
- ansible.builtin.lineinfile:
- path: /usr/local/apnscp/resources/templates/plans/basic/bandwidth
- # Line to Search/Match against
- regexp: '{{ item.From }}'
- # Line to Replace with
- line: '{{ item.To }}'
- state: present
- with_items:
- - { From: 'enabled = 0', To: 'enabled = 1'}
- - { From: 'threshold = 50', To: 'threshold = 200'}
- - { From: 'units = GB', To: 'units = TB'}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement