Hello Kai,
Thanks for the update..
yes it works as root..
And I have used "-s" option ..
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
On Saturday, April 23, 2016 at 12:11:19 PM UTC-7, Kai Stian Olstad wrote:
>
> On 20. april 2016 00:26, Jai Reddy wrote:
> > Greetings,
> >
> > 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
>
> The return messages says you do not have permission, have you tried
> running it as root?
> Add -s to the ansible command to run it with sudo.
>
> --
> Kai Stian Olstad
>
--
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/6ca37a30-37b7-4d57-a0d2-efe564b1d82a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.