From fb3af255d9666b4e1e87b134c6d918725b792544 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 22 Feb 2021 15:50:07 -0500 Subject: [PATCH] Add more info to apply messaging --- salt/common/tools/sbin/so-rule | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/salt/common/tools/sbin/so-rule b/salt/common/tools/sbin/so-rule index d365d0856..9654456b4 100644 --- a/salt/common/tools/sbin/so-rule +++ b/salt/common/tools/sbin/so-rule @@ -38,19 +38,20 @@ def print_err(string: str): def check_apply(args: dict, prompt: bool = True): cmd_arr = ['salt-call', 'state.apply', 'idstools', 'queue=True'] - + if args.apply: - print('Applying idstools state...') + print('Configuration updated. Applying idstools state...') return subprocess.run(cmd_arr) else: if prompt: - message = 'Would you like to apply your changes now? (y/N) ' + message = 'Configuration updated. Would you like to apply your changes now? (y/N) ' answer = input(message) while answer.lower() not in [ 'y', 'n', '' ]: answer = input(message) if answer.lower() in [ 'n', '' ]: return 0 else: + print('Applying idstools state...') return subprocess.run(cmd_arr) else: return 0