Pārlūkot izejas kodu

Added package-map.jinja

master
Seth House pirms 11 gadiem
vecāks
revīzija
66683570e9
3 mainītis faili ar 21 papildinājumiem un 8 dzēšanām
  1. +3
    -6
      apache/init.sls
  2. +12
    -0
      apache/package-map.jinja
  3. +6
    -2
      pillar.example

+ 3
- 6
apache/init.sls Parādīt failu

@@ -1,13 +1,10 @@
{% set pkg = salt['grains.filter_by']({
'Debian': {'name': 'apache2'},
'RedHat': {'name': 'httpd'},
}) %}
{% from "apache/package-map.jinja" import apache with context %}

apache:
pkg:
- installed
- name: {{ pkg.name }}
- name: {{ apache.server }}
service:
- running
- name: {{ pkg.name }}
- name: {{ apache.service }}
- enable: True

+ 12
- 0
apache/package-map.jinja Parādīt failu

@@ -0,0 +1,12 @@
{% set apache = salt['grains.filter_by']({
'Debian': {
'server': 'apache2',
'service': 'apache2',
'conf': '/etc/apache2/conf.d',
},
'RedHat': {
'server': 'httpd',
'service': 'httpd',
'conf': '/etc/httpd/conf.d',
},
}, merge=salt['pillar.get']('apache:lookup')) %}

+ 6
- 2
pillar.example Parādīt failu

@@ -1,7 +1,11 @@
# Example for the apache.debian_full formula:
# ``apache`` formula configuration:
apache:
server: apache2
service: apache2
conf: /etc/apache2/conf.d

# ``apache.debian_full`` formula additional configuration:
apache:
php-ini: 'salt://path/to/file/php.ini'
register-site:
# any name as an array index, and you can duplicate this section
{{UNQIUE}}:

Notiek ielāde…
Atcelt
Saglabāt