Reputation: 10281
I have the following sls file:
python:
pkg.installed:
- pkgs:
- python2_x64
How can I edit this file to make sure pkg.refresh_db
is executed prior to attepting to install Python?
I can manually run the refresh like this: salt -G 'os:windows' pkg.refresh_db
Upvotes: 0
Views: 1420
Reputation: 2506
Add refresh: True
to the pkg.installed
state:
python:
pkg.installed:
- pkgs:
- python2_x64
- refresh: True
or even shorter:
python2_x64:
pkg.installed:
- refresh: True
Upvotes: 0
Reputation: 10281
pkg:
module.run:
- name: pkg.refresh_db
python:
pkg.installed:
- pkgs:
- python2_x64
Upvotes: 1