Is it possible to ping remote server, without sudo configuration of the salt-minion machine 'sudo visudo' ??
/etc/salt/roster:
test-ubuntu-minion01:
host: 127.0.0.1
user: abc
passwd: ****
sudo: True
Command:
sudo salt-ssh -i 'test-ubuntu-minion01' state.sls test.ping
stderr:
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
stdout:
ERROR: sudo expected a password, NOPASSWD required
I think this is related to #8882.
cheers
Tim
I think @tbaker57 is right that this is a duplicate of #8882. However, @basepi might have more information about that.
@hari316 If you install sshpass, will that resolve the problem for you?
@rallytime, I am still getting the error, even though sshpass is installed on salt-master and salt-minion.
/etc/salt/roster:
test-ubuntu-minion01:
host: 10.xx.xxx.xxx
user: username
passwd: xxxxx
sudo: True
Try adding tty: True to your roster entry.
@basepi I get the following:
[DEBUG ] STDERR 10.xx.xxx.xxx
Connection to 10.xx.xxx.xxx closed.
[DEBUG ] RETCODE 10.xx.xxx.xxx: 0
test-ubuntu-minion01:
----------
_caller_cachedir:
/var/cache/salt/master
_error:
Failed to return clean data
_ssh_version:
5.9p1 Debian-5ubuntu1.4
ext_pillar:
extension_modules:
/var/cache/salt/extmods
file_roots:
----------
base:
- /srv/salt
id:
test-ubuntu-minion01
pillar_roots:
----------
base:
- /srv/pillar
stderr:
Connection to 10.xx.xxx.xxx closed.
In addition detailed dictionary as stdout
Ah, now that I look at this in more detail, I do think it's a duplicate of #8882 and am going to close it as such.
@basepi I dont find any resolution to the issue, Kindly provide some pointer or the issue still exists ??
But it is something we want to add.
I am interested in salt too. and I wonder if pexpect library count help.
Most helpful comment
But it is something we want to add.