Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1- Old Juniper option

...


https://dev.to/trickvi/let-s-get-started-with-salt-55hb
pull the Master containerdocker pull datica/salt-master
start the container

docker run -it  datica/salt-master bash

edit the /etc/salt/master file

vi /etc/salt/master


mount the local file to container directory
start the master daemonsalt-minion -l debug  [ debug mode ]    or     salt-minion -d  [ deamon mode ]
accept the key

salt-key L

salt-key -a fw1   or -A for all

pull the Minion containerdocker pull datica/salt-minion


...


https://hub.docker.com/r/juniper/saltstack
pull the image
create/run the container

docker run -it -d -v $PWD:/etc/salt/ juniper/saltstack salt-master -l debug

#docker run -d juniper/saltstack salt-master -l debug

log into the containerdocker exec -it <container_Name>Issue 

/home/labuser/.local/bin/salt-key


Issue : python interpreter

/home/labuser/.local/bin/master

/home/labuser/.local/bin/salt-key

Code Block
titleissue
collapsetrue
labuser@saltsackmaster:/etc/salt$ salt --version
-bash: /home/labuser/.local/bin/salt: /usr/bin/python: bad interpreter: No such file or directory



labuser@saltsackmaster:/etc/salt$ vi /home/labuser/.local/bin/salt
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from salt.scripts import salt_main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(salt_main())

...