From 0c60feac0290b90df89f0f239a6d2549afe75b9d Mon Sep 17 00:00:00 2001 From: jacobhammons Date: Tue, 28 Jun 2016 10:03:59 -0600 Subject: [PATCH] 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 --- doc/ref/configuration/logging/index.rst | 10 +++++----- salt/modules/dnsmasq.py | 8 +++++++- salt/modules/file.py | 7 +++++++ salt/states/file.py | 13 ++++++++++++- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/doc/ref/configuration/logging/index.rst b/doc/ref/configuration/logging/index.rst index d59656ad32..765ad601e2 100644 --- a/doc/ref/configuration/logging/index.rst +++ b/doc/ref/configuration/logging/index.rst @@ -58,8 +58,8 @@ Examples: Default: ``warning`` -The level of log record messages to send to the console. -One of ``all``, ``garbage``, ``trace``, ``debug``, ``info``, ``warning``, +The level of log record messages to send to the console. One of ``all``, +``garbage``, ``trace``, ``debug``, ``profile``, ``info``, ``warning``, ``error``, ``critical``, ``quiet``. .. code-block:: yaml @@ -75,9 +75,9 @@ One of ``all``, ``garbage``, ``trace``, ``debug``, ``info``, ``warning``, Default: ``warning`` -The level of messages to send to the log file. -One of ``all``, ``garbage``, ``trace``, ``debug``, ``info``, ``warning``, -``error``, ``critical``, ``quiet``. +The level of messages to send to the log file. One of ``all``, ``garbage``, +``trace``, ``debug``, ``profile``, ``info``, ``warning``, ``error``, +``critical``, ``quiet``. .. code-block:: yaml diff --git a/salt/modules/dnsmasq.py b/salt/modules/dnsmasq.py index 40f742fc2a..bc6bec692e 100644 --- a/salt/modules/dnsmasq.py +++ b/salt/modules/dnsmasq.py @@ -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 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: .. code-block:: bash salt '*' dnsmasq.set_config 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) includes = [config_file] diff --git a/salt/modules/file.py b/salt/modules/file.py index d7fb3fdcd0..6e90ae9570 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -2822,6 +2822,13 @@ def copy(src, dst, recurse=False, remove_existing=False): remove_existing will remove all files in the target directory, 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 + ` and :mod:`states.file.recurse + `. + CLI Example: .. code-block:: bash diff --git a/salt/states/file.py b/salt/states/file.py index 1ebab77c1a..2452d1cac5 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -1099,7 +1099,10 @@ def managed(name, source 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 from Amazon S3 compatible URLs with both pre-configured and automatic 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 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 + ` and :mod:`states.file.recurse + `. + ''' name = os.path.expanduser(name) source = os.path.expanduser(source)