I would like to run Command "ll /dev/disk/by-id/scsi-* " to get the scsi ID. I've tried command and Shell with become: yes, but no luck.
- name: Get ISCSI Id
command: ll /dev/disk/by-id/scsi-*
register: iscsiid
become: yes
Error:
"changed": false,
"cmd": "ll '/dev/disk/by-id/scsi-*'",
"invocation": {
"module_args": {
"_raw_params": "ll /dev/disk/by-id/scsi-*",
"_uses_shell": false,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"warn": true
}
},
"msg": "[Errno 2] No such file or directory",
"rc": 2
}
Any Idea how to run this command? It works whenI run manually as root user.
Thanks,