From 1c1d338359142e6eadf02a03ca58a9220c75bbb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Paw=C5=82owski?= Date: Wed, 19 Aug 2015 16:59:04 +0200 Subject: [PATCH] ng.install: subscribe to repo only if install_from_repo variable is set to true --- nginx/ng/install.sls | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nginx/ng/install.sls b/nginx/ng/install.sls index 99a84dd..01c164d 100644 --- a/nginx/ng/install.sls +++ b/nginx/ng/install.sls @@ -51,7 +51,12 @@ nginx_zypp_repo: {% if salt['grains.get']('os_family') == 'RedHat' %} nginx_yum_repo: - pkgrepo.managed: + pkgrepo: + {%- if nginx.install_from_repo %} + - managed + {%- else %} + - absent + {%- endif %} - name: nginx - humanname: nginx repo {%- if salt['grains.get']('os') == 'CentOS' %}