Merge pull request #198 from aanriot/master

Allow installation of multiple packages
This commit is contained in:
Niels Abspoel 2018-10-19 21:18:28 +02:00 committed by GitHub
commit 4323f638f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -24,7 +24,14 @@
nginx_install: nginx_install:
pkg.installed: pkg.installed:
{{ sls_block(nginx.package.opts) }} {{ sls_block(nginx.package.opts) }}
{% if nginx.lookup.package is iterable and nginx.lookup.package is not string %}
- pkgs:
{% for pkg in nginx.lookup.package %}
- {{ pkg }}
{% endfor %}
{% else %}
- name: {{ nginx.lookup.package }} - name: {{ nginx.lookup.package }}
{% endif %}
{% if salt['grains.get']('os_family') == 'Debian' %} {% if salt['grains.get']('os_family') == 'Debian' %}
nginx_official_repo: nginx_official_repo:

View File

@ -44,7 +44,7 @@ nginx:
# These are usually set by grains in map.jinja # These are usually set by grains in map.jinja
# Typically you can comment these out. # Typically you can comment these out.
lookup: lookup:
package: nginx-custom package: nginx-custom (can be a list)
service: nginx service: nginx
webuser: www-data webuser: www-data
conf_file: /etc/nginx/nginx.conf conf_file: /etc/nginx/nginx.conf