mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #30532 from whiteinge/slsutil-mod
Add execution module for working in sls files
This commit is contained in:
commit
05d05263ab
2 changed files with 36 additions and 0 deletions
|
@ -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
35
salt/modules/slsutil.py
Normal 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}'
|
||||
'''
|
Loading…
Add table
Reference in a new issue