Merge branch '2017.7' into 'oxygen'

Conflicts:
  - salt/crypt.py
  - salt/states/pkgrepo.py
This commit is contained in:
rallytime 2018-02-01 17:11:38 -05:00
commit 79d071df9c
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
8 changed files with 108 additions and 73 deletions

View file

@ -1914,7 +1914,9 @@ class Minion(MinionBase):
load['out'] = oput
if self.opts['cache_jobs']:
# Local job cache has been enabled
salt.utils.minion.cache_jobs(self.opts, load['jid'], ret)
if ret['jid'] == 'req':
ret['jid'] = salt.utils.jid.gen_jid()
salt.utils.minion.cache_jobs(self.opts, ret['jid'], ret)
if not self.opts['pub_ret']:
return ''

View file

@ -824,10 +824,10 @@ def mod_repo(repo, **kwargs):
be created, so long as the following values are specified:
repo or alias
alias by which the zypper refers to the repo
alias by which Zypper refers to the repo
url, mirrorlist or baseurl
the URL for zypper to reference
the URL for Zypper to reference
enabled
Enable or disable (True or False) repository,
@ -842,12 +842,13 @@ def mod_repo(repo, **kwargs):
gpgcheck
Enable or disable (True or False) GPG check for this repository.
gpgautoimport
Automatically trust and import new repository.
gpgautoimport : False
If set to True, automatically trust and import public GPG key for
the repository.
Key/Value pairs may also be removed from a repo's configuration by setting
a key to a blank value. Bear in mind that a name cannot be deleted, and a
url can only be deleted if a mirrorlist is specified (or vice versa).
URL can only be deleted if a ``mirrorlist`` is specified (or vice versa).
CLI Examples:

View file

@ -3623,7 +3623,9 @@ def retention_schedule(name, retain, strptime_format=None, timezone=None):
This is only used when datetime is pulled from ``os.path.getmtime()``.
Defaults to ``None`` which uses the timezone from the locale.
.. code-block: yaml
Usage example:
.. code-block:: yaml
/var/backups/example_directory:
file.retention_schedule:
@ -3877,7 +3879,7 @@ def line(name, content=None, match=None, mode=None, location=None,
processing can be bypassed in order to pass an equal sign through to the
remote shell command by manually specifying the kwarg:
.. code-block: yaml
.. code-block:: yaml
update_config:
file.line:

View file

@ -4,17 +4,38 @@ Manage Grafana v4.0 Dashboards
.. versionadded:: 2017.7.0
.. code-block:: yaml
:configuration: This state requires a configuration profile to be configured
in the minion config, minion pillar, or master config. The module will use
the 'grafana' key by default, if defined.
grafana:
grafana_timeout: 3
grafana_token: qwertyuiop
grafana_url: 'https://url.com'
Example configuration using basic authentication:
.. code-block:: yaml
grafana:
grafana_url: http://grafana.localhost
grafana_user: admin
grafana_password: admin
grafana_timeout: 3
Example configuration using token based authentication:
.. code-block:: yaml
grafana:
grafana_url: http://grafana.localhost
grafana_token: token
grafana_timeout: 3
The behavior of this module is to create dashboards if they do not exist, to
add rows if they do not exist in existing dashboards, and to update rows if
they exist in dashboards. The module will not manage rows that are not defined,
allowing users to manage their own custom rows.
.. code-block:: yaml
Ensure minimum dashboard is managed:
grafana_dashboard.present:
grafana4_dashboard.present:
- name: insightful-dashboard
- base_dashboards_from_pillar:
- default_dashboard
@ -30,12 +51,6 @@ Manage Grafana v4.0 Dashboards
- target: alias(constantLine(50), 'max')
title: Imaginary
type: graph
The behavior of this module is to create dashboards if they do not exist, to
add rows if they do not exist in existing dashboards, and to update rows if
they exist in dashboards. The module will not manage rows that are not defined,
allowing users to manage their own custom rows.
'''
# Import Python libs

View file

@ -4,31 +4,36 @@ Manage Grafana v4.0 data sources
.. versionadded:: 2017.7.0
Token auth setup
:configuration: This state requires a configuration profile to be configured
in the minion config, minion pillar, or master config. The module will use
the 'grafana' key by default, if defined.
.. code-block:: yaml
Example configuration using basic authentication:
grafana_version: 4
grafana:
grafana_timeout: 5
grafana_token: qwertyuiop
grafana_url: 'https://url.com'
.. code-block:: yaml
Basic auth setup
grafana:
grafana_url: http://grafana.localhost
grafana_user: admin
grafana_password: admin
grafana_timeout: 3
.. code-block:: yaml
Example configuration using token based authentication:
grafana_version: 4
grafana:
grafana_timeout: 5
grafana_user: grafana
grafana_password: qwertyuiop
grafana_url: 'https://url.com'
.. code-block:: yaml
grafana:
grafana_url: http://grafana.localhost
grafana_token: token
grafana_timeout: 3
The bahavior of this module is to create data sources if the do not exists, and
to update data sources if the already exists.
.. code-block:: yaml
Ensure influxdb data source is present:
grafana_datasource.present:
grafana4_datasource.present:
- name: influxdb
- type: influxdb
- url: http://localhost:8086

View file

@ -4,26 +4,28 @@ Manage Grafana v4.0 orgs
.. versionadded:: 2017.7.0
Token auth setup
:configuration: This state requires a configuration profile to be configured
in the minion config, minion pillar, or master config. The module will use
the 'grafana' key by default, if defined.
.. code-block:: yaml
Example configuration using basic authentication:
grafana_version: 4
grafana:
grafana_timeout: 5
grafana_token: qwertyuiop
grafana_url: 'https://url.com'
.. code-block:: yaml
Basic auth setup
grafana:
grafana_url: http://grafana.localhost
grafana_user: admin
grafana_password: admin
grafana_timeout: 3
.. code-block:: yaml
Example configuration using token based authentication:
grafana_version: 4
grafana:
grafana_timeout: 5
grafana_org: grafana
grafana_password: qwertyuiop
grafana_url: 'https://url.com'
.. code-block:: yaml
grafana:
grafana_url: http://grafana.localhost
grafana_token: token
grafana_timeout: 3
.. code-block:: yaml

View file

@ -4,26 +4,28 @@ Manage Grafana v4.0 users
.. versionadded:: 2017.7.0
Token auth setup
:configuration: This state requires a configuration profile to be configured
in the minion config, minion pillar, or master config. The module will use
the 'grafana' key by default, if defined.
.. code-block:: yaml
Example configuration using basic authentication:
grafana_version: 4
grafana:
grafana_timeout: 5
grafana_token: qwertyuiop
grafana_url: 'https://url.com'
.. code-block:: yaml
Basic auth setup
grafana:
grafana_url: http://grafana.localhost
grafana_user: admin
grafana_password: admin
grafana_timeout: 3
.. code-block:: yaml
Example configuration using token based authentication:
grafana_version: 4
grafana:
grafana_timeout: 5
grafana_user: grafana
grafana_password: qwertyuiop
grafana_url: 'https://url.com'
.. code-block:: yaml
grafana:
grafana_url: http://grafana.localhost
grafana_token: token
grafana_timeout: 3
.. code-block:: yaml

View file

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
'''
Management of APT/RPM package repos
===================================
Management of APT/DNF/YUM/Zypper package repos
==============================================
Package repositories for APT-based and RPM-based distros(openSUSE/SUSE, CentOS/Fedora/Redhat) can be managed with
these states. Here is some example SLS:
States for managing software package repositories on Linux distros. Supported
package managers are APT, DNF, YUM and Zypper. Here is some example SLS:
.. code-block:: yaml
@ -154,8 +154,14 @@ def managed(name, ppa=None, **kwargs):
enabled configuration. Anything supplied for this list will be saved
in the repo configuration with a comment marker (#) in front.
Additional configuration values seen in repo files, such as ``gpgkey`` or
``gpgcheck``, will be used directly as key-value pairs. For example:
gpgautoimport
Only valid for Zypper package manager. If set to True, automatically
trust and import public GPG key for the repository. The key should be
specified with ``gpgkey`` parameter. See details below.
Additional configuration values seen in YUM/DNF/Zypper repo files, such as
``gpgkey`` or ``gpgcheck``, will be used directly as key-value pairs.
For example:
.. code-block:: yaml
@ -221,7 +227,7 @@ def managed(name, ppa=None, **kwargs):
and/or installing packages.
enabled : True
Included to reduce confusion due to yum/dnf/zypper's use of the
Included to reduce confusion due to YUM/DNF/Zypper's use of the
``enabled`` argument. If this is passed for an APT-based distro, then
the reverse will be passed as ``disabled``. For example, passing
``enabled=False`` will assume ``disabled=False``.