I am trying to run the needrestart tool to check processes with outdated libraries. When I run needstart with commands or shell modules from the impossible, it says that I need to restart my ssh daemon. When I start requirerestart manually, it says that there are no processes with obsolete libraries.
When I restart the ssh daemon, it does not matter. But after rebooting the remote server, the ssh daemon is not listed as a service that I have to restart.
So I really donβt understand the difference between ansible ssh connection and my ssh connection, which causes different needrestart behavior.
Any help would be appreciated!
Thanks in advance and best regards
Max
My local machine
$ python -V Python 2.7.13 $ ansible --version ansible 2.2.0.0 $ cat ansible.cfg [defaults] inventory = hosts ask_vault_pass = True retry_files_enabled = False
I am using ssh proxy to connect to the server:
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q user@jumphost.example.com "'
Remote server
$ cat /etc/debian_version 8.6 $ python -V Python 2.7.9
Using affordable
$ ansible example.com -m command -a 'needrestart -b -l -rl' Vault password: example.com | SUCCESS | rc=0 >> NEEDRESTART-VER: 1.2 NEEDRESTART-SVC: ssh.service $ ansible example.com -m shell -a 'needrestart -b -l -rl' Vault password: example.com | SUCCESS | rc=0 >> NEEDRESTART-VER: 1.2 NEEDRESTART-SVC: ssh.service
Using ssh
$ ssh example.com 'needrestart -b -l -rl' NEEDRESTART-VER: 1.2 Killed by signal 1.
source share