Hi,
I have this piece of yaml playbook:
- name: get read block device such /dev/sdX
shell: "readlink -f /dev/disk/by-id/google-{{ item.block }}"
with_items: mounts
register: device
- debug: var=device.results
Trying to get the read "sd" device from a symlink.
the output of device.results is:
ok: [ygtest] => {
"var": {
"device.results": [
{
"changed": true,
"cmd": "readlink -f /dev/disk/by-id/google-local-ssd-0",
"delta": "0:00:00.003578",
"end": "2015-05-07 08:56:24.201753",
"invocation": {
"module_args": "readlink -f
/dev/disk/by-id/google-local-ssd-0",
"module_name": "shell"
},
"item": {
"block": "local-ssd-0"
},
"rc": 0,
"start": "2015-05-07 08:56:24.198175",
"stderr": "",
"stdout": "/dev/sdb",
"stdout_lines": [
"/dev/sdb"
],
"warnings": []
}
]
}
}
How can I access the "stdout" value? I need the output of "/dev/sdb"
Thanks.
--
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/ae25187d-b1f5-4d7a-8b56-e2248165e94f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.