From e0978220f71097b7fd2189b6d90a16a0c33eb485 Mon Sep 17 00:00:00 2001 From: Morgan Willcock Date: Wed, 31 Aug 2016 20:34:49 +0100 Subject: [PATCH] win_pkg: allow minion upgrade when using batteries Don't prevent the Scheduled Task option from doing package operations, when the system is running on batteries --- salt/modules/win_pkg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/salt/modules/win_pkg.py b/salt/modules/win_pkg.py index 18a6f1e5c4..0ad4c22b92 100644 --- a/salt/modules/win_pkg.py +++ b/salt/modules/win_pkg.py @@ -694,7 +694,9 @@ def install(name=None, refresh=False, pkgs=None, saltenv='base', **kwargs): start_in=cache_path, trigger_type='Once', start_date='1975-01-01', - start_time='01:00') + start_time='01:00', + ac_only=False, + stop_if_on_batteries=False) # Run Scheduled Task __salt__['task.run_wait'](name='update-salt-software') else: @@ -953,7 +955,9 @@ def remove(name=None, pkgs=None, version=None, **kwargs): start_in=cache_path, trigger_type='Once', start_date='1975-01-01', - start_time='01:00') + start_time='01:00', + ac_only=False, + stop_if_on_batteries=False) # Run Scheduled Task __salt__['task.run_wait'](name='update-salt-software') else: