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
This commit is contained in:
Morgan Willcock 2016-08-31 20:34:49 +01:00 committed by GitHub
parent 6d0d52fa86
commit e0978220f7

View File

@ -694,7 +694,9 @@ def install(name=None, refresh=False, pkgs=None, saltenv='base', **kwargs):
start_in=cache_path, start_in=cache_path,
trigger_type='Once', trigger_type='Once',
start_date='1975-01-01', start_date='1975-01-01',
start_time='01:00') start_time='01:00',
ac_only=False,
stop_if_on_batteries=False)
# Run Scheduled Task # Run Scheduled Task
__salt__['task.run_wait'](name='update-salt-software') __salt__['task.run_wait'](name='update-salt-software')
else: else:
@ -953,7 +955,9 @@ def remove(name=None, pkgs=None, version=None, **kwargs):
start_in=cache_path, start_in=cache_path,
trigger_type='Once', trigger_type='Once',
start_date='1975-01-01', start_date='1975-01-01',
start_time='01:00') start_time='01:00',
ac_only=False,
stop_if_on_batteries=False)
# Run Scheduled Task # Run Scheduled Task
__salt__['task.run_wait'](name='update-salt-software') __salt__['task.run_wait'](name='update-salt-software')
else: else: