mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
57b5b594bd
commit
03400ef45b
1 changed files with 15 additions and 14 deletions
|
@ -279,13 +279,13 @@ the case when the dependency is unavailable.
|
|||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
only load cheese if enzymes are available
|
||||
'''
|
||||
if HAS_ENZYMES:
|
||||
return 'cheese'
|
||||
else:
|
||||
return (False, 'The cheese execution module cannot be loaded: enzymes unavailable.')
|
||||
'''
|
||||
only load cheese if enzymes are available
|
||||
'''
|
||||
if HAS_ENZYMES:
|
||||
return 'cheese'
|
||||
else:
|
||||
return (False, 'The cheese execution module cannot be loaded: enzymes unavailable.')
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
@ -294,13 +294,14 @@ the case when the dependency is unavailable.
|
|||
'''
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
only load cheese if enzymes are available
|
||||
'''
|
||||
if 'cheese.slice' in __salt__:
|
||||
return 'cheese'
|
||||
else:
|
||||
return (False, 'The cheese state module cannot be loaded: enzymes unavailable.')
|
||||
'''
|
||||
only load cheese if enzymes are available
|
||||
'''
|
||||
# predicate loading of the cheese state on the corresponding execution module
|
||||
if 'cheese.slice' in __salt__:
|
||||
return 'cheese'
|
||||
else:
|
||||
return (False, 'The cheese state module cannot be loaded: enzymes unavailable.')
|
||||
|
||||
|
||||
Documentation
|
||||
|
|
Loading…
Add table
Reference in a new issue