Updated formula for FreeBSD

This commit is contained in:
Gregory Ballantine 2023-03-17 16:56:05 -04:00
parent ed044c065a
commit 5db90260cc
4 changed files with 21 additions and 3 deletions

View File

@ -1,2 +1,13 @@
# nslcd-formula # nslcd-formula
SaltStack formula to manage nslcd service and configuration SaltStack formula to manage nslcd service and configuration
## States
`nslcd`
Manages the nslcd installation, service and configuration.
`nslcd.pam_ldap`
Installs the pam_ldap package and configures it.

View File

@ -4,7 +4,7 @@ nslcd:
conf_path: /etc/nslcd.conf conf_path: /etc/nslcd.conf
conf_user: root conf_user: root
conf_group: root conf_group: root
conf_mode: 640 conf_mode: 600
service_name: nslcd service_name: nslcd
service_enable: True service_enable: True

View File

@ -1,8 +1,10 @@
{% from "nslcd/map.jinja" import nslcd_settings as nslcd with context %} {% from "nslcd/map.jinja" import nslcd_settings as nslcd with context %}
{% if nslcd.package_name %}
nslcd_package: nslcd_package:
pkg.installed: pkg.installed:
- name: {{ nslcd.package_name }} - name: {{ nslcd.package_name }}
{% endif %}
nslcd_conf: nslcd_conf:
file.managed: file.managed:
@ -20,5 +22,7 @@ nslcd_service:
- name: {{ nslcd.service_name }} - name: {{ nslcd.service_name }}
- enable: {{ nslcd.service_enable }} - enable: {{ nslcd.service_enable }}
- watch: - watch:
{% if nslcd.package_name %}
- pkg: nslcd_package - pkg: nslcd_package
{% endif %}
- file: nslcd_conf - file: nslcd_conf

View File

@ -11,9 +11,12 @@ that differ from whats in defaults.yaml
{% set flavor_map = salt['grains.filter_by']( {% set flavor_map = salt['grains.filter_by'](
{ {
'Debian': {}, 'Debian': {},
'FreeBSD': {}, 'FreeBSD': {
'package_name': False,
'conf_path': '/usr/local/etc/nslcd.conf',
},
'RedHat': { 'RedHat': {
'package_name': 'nss-pam-ldapd' 'package_name': 'nss-pam-ldapd',
} }
}, },
grain='os_family', grain='os_family',