mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add execution module for working in sls files
This commit is contained in:
parent
e366f6a7fd
commit
155966c9d2
1 changed files with 35 additions and 0 deletions
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