saltstack-formulas / users-formula

Configure users via pillar
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
99 stars 362 forks source link

[BUG] ssh_auth depends by ssh binary presence #226

Open Sjd-Risca opened 3 years ago

Sjd-Risca commented 3 years ago

Your setup

Formula commit hash / release tag

Formula at version v0.48.4

Versions reports (master & minion)

salt-minion at 3002.6

Pillar / config used

users:
   demouser:
     system: false
     sudouser: false
     ssh_auth:
       - ssh-rsa AAAAB3NzaC1yc2EAAaJNOUNEQWMEMSJo {...} ==

Bug details

Describe the bug

Formula fails because ssh_auth is not available since openssh-client is missing.

From minion logs:

2021-08-04 15:52:57.816 | [DEBUG   ] Could not LazyLoad ssh.set_auth_key: 'ssh' __virtual__ returned False: The module requires the ssh binary.
2021-08-04 15:52:57.816 | [DEBUG   ] An exception occurred in this state: 'ssh.set_auth_key'

Steps to reproduce the bug

It is required that no ssh binary is install on the minion.

Expected behaviour

The formula, is notice that ssh is missing, properly provide to install it in order to later manage also the auth key.