Doc clarifications to file modules, addition of new profile log level to docs, fixed example in dnsmasq (#34323)

Refs #34249
Refs #34261
Refs #33694
Refs #34247
This commit is contained in:
jacobhammons 2016-06-28 10:03:59 -06:00 committed by Nicole Thomas
parent b793426c23
commit 0c60feac02
4 changed files with 31 additions and 7 deletions

View File

@ -58,8 +58,8 @@ Examples:
Default: ``warning`` Default: ``warning``
The level of log record messages to send to the console. The level of log record messages to send to the console. One of ``all``,
One of ``all``, ``garbage``, ``trace``, ``debug``, ``info``, ``warning``, ``garbage``, ``trace``, ``debug``, ``profile``, ``info``, ``warning``,
``error``, ``critical``, ``quiet``. ``error``, ``critical``, ``quiet``.
.. code-block:: yaml .. code-block:: yaml
@ -75,9 +75,9 @@ One of ``all``, ``garbage``, ``trace``, ``debug``, ``info``, ``warning``,
Default: ``warning`` Default: ``warning``
The level of messages to send to the log file. The level of messages to send to the log file. One of ``all``, ``garbage``,
One of ``all``, ``garbage``, ``trace``, ``debug``, ``info``, ``warning``, ``trace``, ``debug``, ``profile``, ``info``, ``warning``, ``error``,
``error``, ``critical``, ``quiet``. ``critical``, ``quiet``.
.. code-block:: yaml .. code-block:: yaml

View File

@ -71,13 +71,19 @@ def set_config(config_file='/etc/dnsmasq.conf', follow=True, **kwargs):
to the end of the main config file (and not to any includes). If you need to the end of the main config file (and not to any includes). If you need
an option added to a specific include file, specify it as the config_file. an option added to a specific include file, specify it as the config_file.
:param string config_file: config file where settings should be updated / added.
:param bool follow: attempt to set the config option inside any file within
the ``conf-dir`` where it has already been enabled.
:param kwargs: key value pairs that contain the configuration settings that you
want set.
CLI Examples: CLI Examples:
.. code-block:: bash .. code-block:: bash
salt '*' dnsmasq.set_config domain=mydomain.com salt '*' dnsmasq.set_config domain=mydomain.com
salt '*' dnsmasq.set_config follow=False domain=mydomain.com salt '*' dnsmasq.set_config follow=False domain=mydomain.com
salt '*' dnsmasq.set_config file=/etc/dnsmasq.conf domain=mydomain.com salt '*' dnsmasq.set_config config_file=/etc/dnsmasq.conf domain=mydomain.com
''' '''
dnsopts = get_config(config_file) dnsopts = get_config(config_file)
includes = [config_file] includes = [config_file]

View File

@ -2822,6 +2822,13 @@ def copy(src, dst, recurse=False, remove_existing=False):
remove_existing will remove all files in the target directory, remove_existing will remove all files in the target directory,
and then copy files from the source. and then copy files from the source.
.. note::
The copy function accepts paths that are local to the Salt minion.
This function does not support salt://, http://, or the other
additional file paths that are supported by :mod:`states.file.managed
<salt.states.file.managed>` and :mod:`states.file.recurse
<salt.states.file.recurse>`.
CLI Example: CLI Example:
.. code-block:: bash .. code-block:: bash

View File

@ -1099,7 +1099,10 @@ def managed(name,
source source
The source file to download to the minion, this source file can be The source file to download to the minion, this source file can be
hosted on either the salt master server, or on an HTTP or FTP server. hosted on either the salt master server (``salt://``), the salt minion
local file system (``/``), or on an HTTP or FTP server (``http(s)://``,
``ftp://``).
Both HTTPS and HTTP are supported as well as downloading directly Both HTTPS and HTTP are supported as well as downloading directly
from Amazon S3 compatible URLs with both pre-configured and automatic from Amazon S3 compatible URLs with both pre-configured and automatic
IAM credentials. (see s3.get state documentation) IAM credentials. (see s3.get state documentation)
@ -3997,6 +4000,14 @@ def copy(
If the name is a directory then place the file inside the named If the name is a directory then place the file inside the named
directory directory
.. note::
The copy function accepts paths that are local to the Salt minion.
This function does not support salt://, http://, or the other
additional file paths that are supported by :mod:`states.file.managed
<salt.states.file.managed>` and :mod:`states.file.recurse
<salt.states.file.recurse>`.
''' '''
name = os.path.expanduser(name) name = os.path.expanduser(name)
source = os.path.expanduser(source) source = os.path.expanduser(source)