forked from saltstack/salt-ci-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.sls
56 lines (49 loc) · 1.37 KB
/
curl.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
{%- if grains['os'] == 'Gentoo' %}
{% set curl = 'net-misc/curl' %}
{% else %}
{% set curl = 'curl' %}
{%- endif %}
{% if grains['os'] in ('Windows') %}
{% set install_method = 'pip.installed' %}
{% set curl = 'pycurl' %}
{% else %}
{% set install_method = 'pkg.installed' %}
{% endif %}
{%- if grains['os_family'] == 'RedHat' or grains['os'] == 'openSUSE' %}
include:
{%- if grains['os'] == 'openSUSE' %}
- ca-certificates-mozilla
{%- elif grains['os_family'] == 'RedHat' %}
- python.ca-certificates
{%- endif %}
{%- endif %}
curl:
{{ install_method }}:
- name: {{ curl }}
{%- if install_method == 'pkg.installed' %}
- aggregate: True
{%- endif %}
- bin_env: {{ salt['config.get']('virtualenv_path', '') }}
- cwd: {{ salt['config.get']('pip_cwd', '') }}
{%- if grains['os_family'] == 'RedHat' or grains['os'] == 'openSUSE' %}
- require:
{%- if grains['os'] == 'openSUSE' %}
- pkg: ca-certificates-mozilla
{%- elif grains['os_family'] == 'RedHat' %}
- pkg: ca-certificates
{%- endif %}
{%- endif %}
{% if grains['os_family'] == 'RedHat' and grains['osmajorrelease']|int == 5 %}
openssl:
pkg.latest:
- aggregate: True
update-openssl:
cmd:
- run
- name: yum update -y --enablerepo=epel openssl
{% endif %}
{% if grains['os'] == 'Arch' %}
openssl:
pkg.latest:
- aggregate: True
{% endif %}