forked from saltstack/salt-ci-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
windeps.sls
89 lines (80 loc) · 1.76 KB
/
windeps.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{% set salt_dir = salt['config.get']('salt_dir', 'c:\\salt').rstrip('\\') %}
{% set bin_env = salt_dir + '\\bin\\Scripts\\pip.exe' %}
{% set cwd_dir = salt_dir + '\\bin\\Scripts' %}
stop-minion:
service.dead:
- name: salt-minion
- enable: False
include:
- python.urllib3
- python.dulwich
{% if salt['config.get']('py3', False) %}
- python3
{% else %}
- python27
{% endif %}
extend:
urllib3:
pip.installed:
- use_wheel: true
- bin_env: {{ bin_env }}
- cwd: {{ cwd_dir }}
dulwich:
pip.installed:
- bin_env: {{ bin_env }}
- cwd: {{ cwd_dir }}
- global_options: '--pure'
- require:
- urllib3
{% if salt['config.get']('py3', False) %}
install_python3:
pkg.installed:
- aggregate: False
- require:
- win-pkg-refresh
{% else %}
python2:
pkg.latest:
- require:
- win-pkg-refresh
{% endif %}
download-git-repos:
module.run:
- name: winrepo_bootstrap.download_git_repos
- require:
- dulwich
win-pkg-refresh:
module.run:
- name: pkg.refresh_db
- require:
- download-git-repos
vcpp-compiler:
pkg.installed:
{% if salt['config.get']('py3', False) %}
- name: ms-vcpp-2015-build-tools
{% else %}
- name: vcforpython27
{% endif %}
- require:
- win-pkg-refresh
git-exists-in-path:
win_path.exists:
- name: 'C:\Program Files\Git\cmd'
git:
pkg.installed:
- refresh_modules: True
- require:
- win-pkg-refresh
- git-exists-in-path
windeps-sync-all:
module.run:
- name: saltutil.sync_all
- require:
- win-pkg-refresh
- git
- vcpp-compiler
{% if salt['config.get']('py3', False) %}
- install_python3
{% else %}
- python2
{% endif %}