Example Saltstack at getstarted/ssh/connect.html is incomplete
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
https://docs.saltstack.com/en/getstarted/ssh/connect.html
If using Saltfile as suggested on the page, salt-ssh will not function because of numerous permissions issues. There are a lot of suggestions in the guide and in error messages to fix those with sudo, but sudo is not an option when running as non-root.
I had to check these additional sources to at least make that example work
https://github.com/saltstack/salt/issues/8062
https://docs.saltstack.com/en/latest/ref/configuration/nonroot.html
Saltfile
salt-ssh:
config_dir: ./etc
roster_file: ./roster
ssh_log_file: /tmp/salt-ssh.txt
./etc/master (not sure about file_roots though)
file_roots:
base:
- .
state_verbose: False
cachedir: /home/non7top/sls/cache
pki_dir: /home/non7top/sls/pki
Most troublesome part was to identify where to put cachedir after I found out about it, I tried cachedir and ssh_cachedir in Saltfile without any effect.
There is also a discrepancy where Saltfile accepts relative paths with ./, while ./etc/master converts ./ to /. Not sure if that is a bug worth submitting.
Setup
python3 -m venv salt
. salt/bin/activate
pip install --upgrade pip wheel
pip install salt-ssh
Steps to Reproduce Issue
Follow the guide
Versions Report
$ salt-ssh --versions-report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.1
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.1
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Jan 14 2019, 11:02:34)
python-gnupg: Not Installed
PyYAML: 5.1.1
PyZMQ: Not Installed
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: Not Installed
System Versions:
dist: Ubuntu 18.04 bionic
locale: UTF-8
machine: x86_64
release: 4.15.0-54-generic
system: Linux
version: Ubuntu 18.04 bionic
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with getstarted/ssh/connect.html and compare its Saltfile example with the reported ./etc/master configuration and the nonroot configuration guide. Reproduce the guide using the listed Python virtual-environment setup and salt-ssh command. Done means the documented example works for a non-root user and clearly explains the required cache and path settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100