mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-23 17:33:10 +01:00
salt3006.9, redo reactors, use virt.shutdown
This commit is contained in:
22
salt/reactor/setSalt.sls
Normal file
22
salt/reactor/setSalt.sls
Normal file
@@ -0,0 +1,22 @@
|
||||
#!py
|
||||
|
||||
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
|
||||
import logging
|
||||
import salt.client
|
||||
local = salt.client.LocalClient()
|
||||
|
||||
def run():
|
||||
|
||||
vm_name = data['name']
|
||||
logging.error("setSalt reactor: start for: %s " % vm_name)
|
||||
|
||||
r = local.cmd(vm_name, 'state.apply', ['setup.virt.setSalt'])
|
||||
|
||||
logging.error("setSalt reactor: return for: %s: %s " % (vm_name,r))
|
||||
logging.error("setSalt reactor: end for: %s " % vm_name)
|
||||
|
||||
return {}
|
||||
Reference in New Issue
Block a user