mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
states.apache_*: readd and deprecate enable and disable
Fixes f3a2b276
.
This commit is contained in:
parent
b7230bded7
commit
17306bfc69
@ -9,11 +9,11 @@ Enable and disable apache confs.
|
||||
.. code-block:: yaml
|
||||
|
||||
Enable security conf:
|
||||
apache_conf.enable:
|
||||
apache_conf.enabled:
|
||||
- name: security
|
||||
|
||||
Disable security conf:
|
||||
apache_conf.disable:
|
||||
apache_conf.disabled:
|
||||
- name: security
|
||||
'''
|
||||
from __future__ import absolute_import
|
||||
@ -64,6 +64,25 @@ def enabled(name):
|
||||
return ret
|
||||
|
||||
|
||||
def enable(name):
|
||||
'''
|
||||
Ensure an Apache conf is enabled.
|
||||
|
||||
.. warning::
|
||||
|
||||
This function is deprecated and will be removed in Salt Nitrogen.
|
||||
|
||||
name
|
||||
Name of the Apache conf
|
||||
'''
|
||||
salt.utils.warn_until(
|
||||
'Nitrogen',
|
||||
'apache_module.enable function has been renamed'
|
||||
' apache_module.enabled and will be removed in Salt Nitrogen'
|
||||
)
|
||||
return enabled(name)
|
||||
|
||||
|
||||
def disabled(name):
|
||||
'''
|
||||
Ensure an Apache conf is disabled.
|
||||
@ -96,3 +115,22 @@ def disabled(name):
|
||||
else:
|
||||
ret['comment'] = '{0} already disabled.'.format(name)
|
||||
return ret
|
||||
|
||||
|
||||
def disable(name):
|
||||
'''
|
||||
Ensure an Apache conf is disabled.
|
||||
|
||||
.. warning::
|
||||
|
||||
This function is deprecated and will be removed in Salt Nitrogen.
|
||||
|
||||
name
|
||||
Name of the Apache conf
|
||||
'''
|
||||
salt.utils.warn_until(
|
||||
'Nitrogen',
|
||||
'apache_module.disable function has been renamed'
|
||||
' apache_module.disabled and will be removed in Salt Nitrogen'
|
||||
)
|
||||
return disabled(name)
|
||||
|
@ -68,6 +68,10 @@ def enable(name):
|
||||
'''
|
||||
Ensure an Apache module is enabled.
|
||||
|
||||
.. warning::
|
||||
|
||||
This function is deprecated and will be removed in Salt Nitrogen.
|
||||
|
||||
name
|
||||
Name of the Apache module
|
||||
'''
|
||||
@ -118,6 +122,10 @@ def disable(name):
|
||||
'''
|
||||
Ensure an Apache module is disabled.
|
||||
|
||||
.. warning::
|
||||
|
||||
This function is deprecated and will be removed in Salt Nitrogen.
|
||||
|
||||
name
|
||||
Name of the Apache module
|
||||
'''
|
||||
|
@ -9,16 +9,19 @@ Enable and disable apache sites.
|
||||
.. code-block:: yaml
|
||||
|
||||
Enable default site:
|
||||
apache_site.enable:
|
||||
apache_site.enabled:
|
||||
- name: default
|
||||
|
||||
Disable default site:
|
||||
apache_site.disable:
|
||||
apache_site.disabled:
|
||||
- name: default
|
||||
'''
|
||||
from __future__ import absolute_import
|
||||
from salt.ext.six import string_types
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
@ -61,6 +64,25 @@ def enabled(name):
|
||||
return ret
|
||||
|
||||
|
||||
def enable(name):
|
||||
'''
|
||||
Ensure an Apache site is enabled.
|
||||
|
||||
.. warning::
|
||||
|
||||
This function is deprecated and will be removed in Salt Nitrogen.
|
||||
|
||||
name
|
||||
Name of the Apache site
|
||||
'''
|
||||
salt.utils.warn_until(
|
||||
'Nitrogen',
|
||||
'apache_module.enable function has been renamed'
|
||||
' apache_module.enabled and will be removed in Salt Nitrogen'
|
||||
)
|
||||
return enabled(name)
|
||||
|
||||
|
||||
def disabled(name):
|
||||
'''
|
||||
Ensure an Apache site is disabled.
|
||||
@ -93,3 +115,22 @@ def disabled(name):
|
||||
else:
|
||||
ret['comment'] = '{0} already disabled.'.format(name)
|
||||
return ret
|
||||
|
||||
|
||||
def disable(name):
|
||||
'''
|
||||
Ensure an Apache site is disabled.
|
||||
|
||||
.. warning::
|
||||
|
||||
This function is deprecated and will be removed in Salt Nitrogen.
|
||||
|
||||
name
|
||||
Name of the Apache site
|
||||
'''
|
||||
salt.utils.warn_until(
|
||||
'Nitrogen',
|
||||
'apache_module.disable function has been renamed'
|
||||
' apache_module.disabled and will be removed in Salt Nitrogen'
|
||||
)
|
||||
return disabled(name)
|
||||
|
Loading…
Reference in New Issue
Block a user