mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-24 18:03:10 +01:00
add preflight check to ensure repo connectivity prior to installing salt-minion with salt-cloud
This commit is contained in:
@@ -33,7 +33,7 @@ defaultsFilename = "/opt/so/saltstack/default/salt/firewall/defaults.yaml"
|
||||
def showUsage(options, args):
|
||||
usage = f'''Usage: {sys.argv[0]} [OPTIONS] <COMMAND> [ARGS...]
|
||||
Options:
|
||||
--apply - After updating the firewall configuration files, apply the new firewall state
|
||||
--apply - After updating the firewall configuration files, apply the new firewall state with queue=True
|
||||
|
||||
General commands:
|
||||
help - Prints this usage information.
|
||||
@@ -105,7 +105,8 @@ def includehost(options, args):
|
||||
|
||||
def apply(options, args):
|
||||
logger.info("Applying firewall configuration changes")
|
||||
proc = subprocess.run(['salt-call', 'state.apply', 'firewall', 'queue=True'])
|
||||
salt_args = ['salt-call', 'state.apply', 'firewall', 'queue=True']
|
||||
proc = subprocess.run(salt_args)
|
||||
if proc.returncode != 0:
|
||||
logger.error("Failed to apply firewall changes")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user