Skip to content

Instantly share code, notes, and snippets.

@pcn
Created April 17, 2018 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcn/8a6189cd1ddf939cf90d0435ba773485 to your computer and use it in GitHub Desktop.
Save pcn/8a6189cd1ddf939cf90d0435ba773485 to your computer and use it in GitHub Desktop.
And now something else is weird with salt-ssh
salt-ssh -c configdir '*cron*' -i --state-output=mixed --roster-file configdir/roster state.sls clobber_minion_master
[ERROR   ] An Exception occurred while executing state.sls: [Errno 13] Permission denied: '/opt/salt/running_data/var'
cron-1:
    An Exception occurred while executing state.sls: [Errno 13] Permission denied: '/opt/salt/running_data/var'

The state itself is just a file.managed:

# The minion_master needs to be overwritten when we replace a
# saltmaster Trying to manage a file directly from salt-ssh using
# e.g. file.manage_file is just difficult and seems to be
# having a hard time finding a file via a salt://somefile url.
#
# This should simplify the matter

/etc/salt/pki/minion/minion_master.pub:
  file.managed:
    - source: salt://clobber_minion_master/assets/minion_master.pub
    - user: root
    - group: root
    - mode: 0755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment