mirror of
https://github.com/saltstack-formulas/nfs-formula.git
synced 2025-04-16 09:40:27 +00:00
Basic server and client states
This commit is contained in:
parent
1d7b83bf55
commit
415bd0c5ff
4 changed files with 42 additions and 0 deletions
16
README.md
16
README.md
|
@ -1,2 +1,18 @@
|
|||
nfs-formula
|
||||
===========
|
||||
|
||||
Available states
|
||||
================
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
``nfs.server``
|
||||
---------------
|
||||
|
||||
Install nfs server components
|
||||
|
||||
``nfs.client``
|
||||
---------------
|
||||
|
||||
Install nfs client components
|
||||
|
|
5
nfs/client.sls
Normal file
5
nfs/client.sls
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% from "nfs/map.jinja" import nfs with context %}
|
||||
|
||||
nfs-client-deps:
|
||||
pkg.installed:
|
||||
- pkgs: {{ nfs.pkgs_client|json }}
|
16
nfs/map.jinja
Normal file
16
nfs/map.jinja
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% set map = {
|
||||
'Ubuntu': {
|
||||
'pkgs_server': ['nfs-common', 'nfs-kernel-server'],
|
||||
'pkgs_client': ['nfs-common']
|
||||
},
|
||||
'Debian': {
|
||||
'pkgs_server': ['nfs-common', 'nfs-kernel-server'],
|
||||
'pkgs_client': ['nfs-common']
|
||||
}
|
||||
} %}
|
||||
|
||||
{% if grains.get('saltversion', '').startswith('0.17') %}
|
||||
{% set nfs = salt['grains.filter_by'](map, merge=salt['pillar.get']('nfs:lookup'), base='default') %}
|
||||
{% else %}
|
||||
{% set nfs = map.get(grains.os) %}
|
||||
{% endif %}
|
5
nfs/server.sls
Normal file
5
nfs/server.sls
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% from "nfs/map.jinja" import nfs with context %}
|
||||
|
||||
nfs-server-deps:
|
||||
pkg.installed:
|
||||
- pkgs: {{ nfs.pkgs_server|json }}
|
Loading…
Add table
Reference in a new issue