From 3e6b236348f0cec522d4dda47cb607d2b1fdd840 Mon Sep 17 00:00:00 2001 From: Bogdan Radulescu Date: Mon, 4 Apr 2016 13:09:31 +0000 Subject: [PATCH] Support installing the packages from the official repo on Debian --- nginx/ng/install.sls | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nginx/ng/install.sls b/nginx/ng/install.sls index 6fd8843..68e0a6d 100644 --- a/nginx/ng/install.sls +++ b/nginx/ng/install.sls @@ -14,6 +14,20 @@ nginx_install: {% endif %} {% if salt['grains.get']('os_family') == 'Debian' %} + {%- if nginx.install_from_repo %} +nginx-official-repo: + pkgrepo: + - managed + - humanname: nginx apt repo + - name: deb http://nginx.org/packages/{{ grains['os'].lower() }}/ {{ grains['oscodename'] }} nginx + - file: /etc/apt/sources.list.d/nginx-official-{{ grains['oscodename'] }}.list + - keyid: ABF5BD827BD9BF62 + - keyserver: keyserver.ubuntu.com + - require_in: + - pkg: nginx + - watch_in: + - pkg: nginx + {%- else %} nginx_ppa_repo: pkgrepo: {%- if nginx.install_from_ppa %} @@ -26,6 +40,7 @@ nginx_ppa_repo: - pkg: nginx_install - watch_in: - pkg: nginx_install + {%- endif %} {% endif %} {% if salt['grains.get']('os_family') == 'Suse' %}