Minionutil
minionutil.change_master
#
Change to different master host.
ARGUMENTS
host
(str): Hostname of the new master to change to.
OPTIONAL ARGUMENTS
confirm
(bool): Acknowledge the execution of this command. Default isFalse
.show_changes
(bool): Show the changes made in the files/etc/salt/minion
and/boot/host.aliases
. Default isFalse
.
note
When the master (hub) is changed, the API endpoint URL won't be updated automatically
unless there is a pending sync (for example coming from an update) that will execute the minion.config state.
note
When moving back and forth between envs and the key hasn't been accepted,
the device will keep retrying to connect to the master. If then the salt-minion service is restarted, the service won`t shutdown until a SIGKILL is sent to the process (i.e. the salt-minion service will keep retrying to connect to the salt-master)
minionutil.help
#
Shows this help information.
minionutil.last_errors
#
Get last errors from minion log.
OPTIONAL ARGUMENTS
file
(str): Default isminion
.until
(str): Default is$
.level
(str): Default iserror
.count
(int): Default is0
.before
(int): Default is0
.after
(int): Default is0
.limit
(int): Default is100
.
minionutil.last_logs
#
Get last log lines from minion log.
OPTIONAL ARGUMENTS
file
(str): Default isminion
.until
(str): Default is$
.match
(str): Default is.*
.count
(int): Default is0
.before
(int): Default is0
.after
(int): Default is0
.limit
(int): Default is100
.
minionutil.last_startup
#
Get log lines for last startup sequence.
OPTIONAL ARGUMENTS
file
(str): Default isminion
.until
(str): Default is$
.match
(str): Default isSetting up the Salt Minion
.limit
(int): Default is100
.
minionutil.log_files
#
List all minion log files.
minionutil.master_status
#
Get status of connection to master.
Implementation originates from the status.master
command but without the logic to trigger events.
minionutil.request_restart
#
Request for a future restart of the minion service.
OPTIONAL ARGUMENTS
pending
(bool): Default isTrue
.immediately
(bool): Default isFalse
.delay
(int): Default is10
.expiration
(int): Default is1200
.reason
(str): Reason code that tells why we decided to restart. Default isunknown
.
minionutil.restart
#
Restart the minion service immediately.
OPTIONAL ARGUMENTS
reason
(str): Reason code that tells why we decided to restart. Default isunknown
.
minionutil.run_job
#
Run a job by passing it to the minion process. This function makes it possible to run states and also get pillar data from external processes (engines etc.).
minionutil.status_schedule
#
Dedicated to be called from schedule and trigger minion status events.
minionutil.trigger_event
#
Triggers an event on the minion event bus.
minionutil.update_release
#
Update a minion to newest release by running a highstate if not already up-to-date.
OPTIONAL ARGUMENTS
force
(bool): Default isFalse
.dry_run
(bool): Default isFalse
.only_retry
(bool): Default isFalse
.