Przeglądaj źródła

BUG: Fix pkgrepo.managed, from_source -> install_from_source (consistency)

susefix
Wes Turner 10 lat temu
rodzic
commit
b2122db4f6
3 zmienionych plików z 24 dodań i 3 usunięć
  1. +21
    -1
      nginx/ng/install.sls
  2. +2
    -1
      nginx/ng/map.jinja
  3. +1
    -1
      nginx/ng/service.sls

+ 21
- 1
nginx/ng/install.sls Wyświetl plik

@@ -5,10 +5,30 @@
{% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}

nginx_install:
{% if nginx.from_source %}
{% if nginx.install_from_source %}
## 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 %}
- humanname: nginx-ppa-{{ grains['oscodename'] }}
- name: deb http://ppa.launchpad.net/nginx/stable/ubuntu {{ grains['oscodename'] }} main
- file: /etc/apt/sources.list.d/nginx-stable-{{ grains['oscodename'] }}.list
- dist: {{ grains['oscodename'] }}
- keyid: C300EE8C
- keyserver: keyserver.ubuntu.com
- require_in:
- pkg: nginx_install
- watch_in:
- pkg: nginx_install
{% endif %}

+ 2
- 1
nginx/ng/map.jinja Wyświetl plik

@@ -25,7 +25,8 @@
'vhost_use_symlink': False,
},
}, default='Debian' ),
'from_source': False,
'install_from_source': False,
'install_from_ppa': False,
'package': {
'opts': {},
},

+ 1
- 1
nginx/ng/service.sls Wyświetl plik

@@ -16,6 +16,6 @@ nginx_service:
- require:
- sls: nginx.ng.install
- watch:
{% if not nginx.from_source %}
{% if not nginx.install_from_source %}
- pkg: nginx_install
{% endif %}

Ładowanie…
Anuluj
Zapisz