Merge pull request #2 from gravyboat/master
Created a map.jinja, changed the init to support it, and fixed up the readme.
This commit is contained in:
Коммит
539a3f3867
16
README.rst
16
README.rst
|
@ -1,7 +1,17 @@
|
|||
dhcpd
|
||||
=====
|
||||
|
||||
dhcpd
|
||||
-----
|
||||
Formulas to install and start dhcpd.
|
||||
|
||||
Install and turn on a basic dhcpd daemon
|
||||
.. note::
|
||||
|
||||
See the full `Salt Formulas installation and usage instructions
|
||||
<http://docs.saltstack.com/topics/conventions/formulas.html>`_.
|
||||
|
||||
Available states
|
||||
================
|
||||
|
||||
``dhcpd``
|
||||
---------
|
||||
|
||||
Install and turn on a basic dhcpd daemon.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{% from "dhcpd/map.jinja" import dhcpd with context %}
|
||||
|
||||
dhcpd:
|
||||
pkg.installed:
|
||||
{% if grains['os_family'] == 'Debian' %}
|
||||
- name: isc-dhcp-server
|
||||
{% else %}
|
||||
- name: dhcp
|
||||
- name: {{ dhcpd.server }}
|
||||
service.running:
|
||||
- name: {{ dhcpd.service }}
|
||||
- enable: True
|
||||
- require:
|
||||
- pkg: dhcpd
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{% set dhcpd = salt['grains.filter_by']({
|
||||
'Debian': {
|
||||
'server': 'isc-dhcp-server',
|
||||
'service': 'isc-dhcp-server',
|
||||
},
|
||||
'RedHat': {
|
||||
'server': 'dhcp',
|
||||
'service': 'dhcpd',
|
||||
},
|
||||
}, merge=salt['pillar.get']('dhcpd:lookup')) %}
|
Загрузка…
Ссылка в новой задаче