I am trying the following, but it isn't quite working like I hoped:
- name: Gather current virtual disks
lineinfile:
path: "{{ file }}"
regexp: (\w+.img)
line: ''
check_mode: yes
register: virt_disk
Result (debug of virt_disk):
ok: [myftpserver] => {
"virt_disk": {
"backup": "",
"changed": true,
"diff": [
{
"after": "",
"after_header": "/var/ftp/vm.cfg (content)",
"before": "",
"before_header": "/var/ftp/vm.cfg (content)"
},
{
"after_header": "/var/ftp/vm.cfg (file attributes)",
"before_header": "/var/ftp/vm.cfg (file attributes)"
}
],
"failed": false,
"msg": "line replaced"
}
}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3354d737-1ab9-49d2-94d8-2a684d46b470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.