Merge pull request #30532 from whiteinge/slsutil-mod

Add execution module for working in sls files
This commit is contained in:
Mike Place 2016-01-22 10:25:16 -07:00
commit 05d05263ab
2 changed files with 36 additions and 0 deletions

View file

@ -260,6 +260,7 @@ Full list of builtin execution modules
service
shadow
slack_notify
slsutil
smartos_imgadm
smartos_virt
smartos_vmadm

35
salt/modules/slsutil.py Normal file
View file

@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
'''
Utility functions for use with or in SLS files
'''
from __future__ import absolute_import
from salt.utils.dictupdate import merge, update
update.__doc__ = update.__doc__ + '''\
CLI Example:
.. code-block:: shell
salt '*' slsutil.update '{foo: Foo}' '{bar: Bar}'
'''
merge.__doc__ = '''\
Merge a data structure into another by choosing a merge strategy
Strategies:
* aggregate
* list
* overwrite
* recurse
* smart
CLI Example:
.. code-block:: shell
salt '*' slsutil.merge '{foo: Foo}' '{bar: Bar}'
'''