Hello There!
I have lot of servers that use multipath.
e.g.
Code:
multipath {
wwid 369834349802938746554637382920111
alias asm_disk1
}
multipath {
wwid 369834349802938746554637382920112
alias asm_disk2
}
I want an ansible playbook that add new entries for me. But it is not working right now. (new multipath entry inside a multipath entry)
Code:
multipath {
# BEGIN ANSIBLE MANAGED BLOCK
multipath {
wwid 369834349802938746554637382920113
alias asm_disk3
}
# END ANSIBLE MANAGED BLOCK
wwid 369834349802938746554637382920112
alias asm_disk2
}
This is my playbook. any ideas how to fix it?
Code:
---
- name: Update Multipath
hosts: localhost
become: yes
tasks:
- name:
blockinfile:
path: /etc/multipath.conf
insertafter: 'multipath'
block: |
multipath {
wwid 369834349802938746554637382920113
alias asm_disk3
}
backup: yes