salt.modules.saltsupport module

codeauthor

Bo Maryniuk <bo@suse.de>

Module to run salt-support within Salt.

class salt.modules.saltsupport.LogCollector

Output collector.

ERROR = 'error'
INFO = 'info'
class MessagesList
append(object) → None -- append object to end
WARNING = 'warning'
error(message, *args, **kwargs)
highlight(message, *values, **kwargs)
info(message, *args, **kwargs)
msg(message, *args, **kwargs)
put(message, *args, **kwargs)
warning(message, *args, **kwargs)
class salt.modules.saltsupport.SaltSupportModule

Salt Support module class.

archives(**kwargs)

Get list of existing archives. :return:

delete_archives(**kwargs)

Delete archives :return:

format_sync_stats(cnt)

Format stats of the sync output.

Parameters

cnt --

Returns

last_archive(**kwargs)

Get the last available archive :return:

profiles(**kwargs)

Get list of profiles.

Returns

run(**kwargs)

Run Salt Support on the minion.

profile

Set available profile name. Default is "default".

pillar

Set available profile from the pillars.

archive

Override archive name. Default is "support". This results to "hostname-support-YYYYMMDD-hhmmss.bz2".

output

Change the default outputter. Default is "nested".

CLI Example:

salt '*' support.run
salt '*' support.run profile=network
salt '*' support.run pillar=something_special
setup_config()

Return current configuration :return:

sync(**kwargs)

Sync the latest archive to the host on given location.

CLI Example:

salt '*' support.sync group=test
salt '*' support.sync group=test name=/tmp/myspecial-12345-67890.bz2
salt '*' support.sync group=test name=/tmp/myspecial-12345-67890.bz2 host=allmystuff.lan
salt '*' support.sync group=test name=/tmp/myspecial-12345-67890.bz2 host=allmystuff.lan location=/opt/
Parameters
  • group -- name of the local directory to which sync is going to put the result files

  • name -- name of the archive. Latest, if not specified.

  • host -- name of the destination host for rsync. Default is master, if not specified.

  • location -- local destination directory, default temporary if not specified

  • move -- move archive file[s]. Default is False.

  • all -- work with all available archives. Default is False (i.e. latest available)

Returns