nginx-formula/nginx/ng/install.sls

30 lines
652 B
Plaintext
Raw Normal View History

2014-05-16 00:06:48 +02:00
# nginx.ng.install
#
# Manages installation of nginx.
2014-05-19 19:22:51 +02:00
2014-05-16 00:06:48 +02:00
{% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
nginx_install:
{% if nginx.install_from_source %}
2014-05-16 00:06:48 +02:00
## add source compilation here
{% else %}
pkg.installed:
{{ sls_block(nginx.package.opts) }}
- name: {{ nginx.lookup.package }}
{% endif %}
{% if salt['grains.get']('os_family') == 'Debian' %}
nginx_ppa_repo:
pkgrepo:
{%- if nginx.install_from_ppa %}
- managed
{%- else %}
- absent
{%- endif %}
2015-02-23 22:16:41 +01:00
- ppa: nginx/{{ nginx.ppa_version }}
- require_in:
- pkg: nginx_install
- watch_in:
- pkg: nginx_install
{% endif %}