I am trying to get the nic (eth0) info using ansible …
When I am running below ansible command I am getting error
ansible all -m shell -a “/sbin/ethtool eth0”
SSH password:
SUDO password[defaults to SSH password]: hosts.example.com | FAILED | rc=75 >>
Settings for eth0:
No data availableCannot get device settings: Operation not permitted
Cannot get wake-on-lan settings: Operation not permitted
Cannot get link status: Operation not permitted
but "ansible all -m shell -a “/sbin/ifconfig -a eth0"” completes with no issues…
ansible root# ansible all -m shell -a “/sbin/ethtool eth4” -s
SSH password:
SUDO password[defaults to SSH password]: xxx.example.com | success | rc=0 >>
Settings for eth4:
Current message level: 0x00000007 (7)
drv probe linkCannot get device settings: Operation not permitted
Cannot get wake-on-lan settings: Operation not permitted
Cannot get link status: Operation not permitted
ansible all -m shell -a "/sbin/ethtool eth4 |grep -i Speed " -s
SSH password:
SUDO password[defaults to SSH password]: xxx.example.com | FAILED | rc=1 >>
Cannot get device settings: Operation not permitted
Cannot get wake-on-lan settings: Operation not permitted
Cannot get link status: Operation not permitted