mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2019.2' into 52036_rsync_state_no_changes_when_error
This commit is contained in:
commit
09d1672648
17 changed files with 103 additions and 17 deletions
|
@ -54,7 +54,7 @@ provisioner:
|
|||
base:
|
||||
"os:Windows":
|
||||
- match: grain
|
||||
- prep_windows
|
||||
- windows
|
||||
"*":
|
||||
- <%= ENV['KITCHEN_STATE'] || 'git.salt' %>
|
||||
pillars:
|
||||
|
|
|
@ -38,6 +38,9 @@ execution modules
|
|||
at_solaris
|
||||
augeas_cfg
|
||||
aws_sqs
|
||||
azurearm_compute
|
||||
azurearm_network
|
||||
azurearm_resource
|
||||
bamboohr
|
||||
bcache
|
||||
beacons
|
||||
|
|
6
doc/ref/modules/all/salt.modules.azurearm_compute.rst
Normal file
6
doc/ref/modules/all/salt.modules.azurearm_compute.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
=============================
|
||||
salt.modules.azurearm_compute
|
||||
=============================
|
||||
|
||||
.. automodule:: salt.modules.azurearm_compute
|
||||
:members:
|
6
doc/ref/modules/all/salt.modules.azurearm_network.rst
Normal file
6
doc/ref/modules/all/salt.modules.azurearm_network.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
=============================
|
||||
salt.modules.azurearm_network
|
||||
=============================
|
||||
|
||||
.. automodule:: salt.modules.azurearm_network
|
||||
:members:
|
6
doc/ref/modules/all/salt.modules.azurearm_resource.rst
Normal file
6
doc/ref/modules/all/salt.modules.azurearm_resource.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
==============================
|
||||
salt.modules.azurearm_resource
|
||||
==============================
|
||||
|
||||
.. automodule:: salt.modules.azurearm_resource
|
||||
:members:
|
|
@ -24,6 +24,9 @@ state modules
|
|||
at
|
||||
augeas
|
||||
aws_sqs
|
||||
azurearm_compute
|
||||
azurearm_network
|
||||
azurearm_resource
|
||||
beacon
|
||||
bigip
|
||||
blockdev
|
||||
|
|
6
doc/ref/states/all/salt.states.azurearm_compute.rst
Normal file
6
doc/ref/states/all/salt.states.azurearm_compute.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
============================
|
||||
salt.states.azurearm_compute
|
||||
============================
|
||||
|
||||
.. automodule:: salt.states.azurearm_compute
|
||||
:members:
|
6
doc/ref/states/all/salt.states.azurearm_network.rst
Normal file
6
doc/ref/states/all/salt.states.azurearm_network.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
============================
|
||||
salt.states.azurearm_network
|
||||
============================
|
||||
|
||||
.. automodule:: salt.states.azurearm_network
|
||||
:members:
|
6
doc/ref/states/all/salt.states.azurearm_resource.rst
Normal file
6
doc/ref/states/all/salt.states.azurearm_resource.rst
Normal file
|
@ -0,0 +1,6 @@
|
|||
=============================
|
||||
salt.states.azurearm_resource
|
||||
=============================
|
||||
|
||||
.. automodule:: salt.states.azurearm_resource
|
||||
:members:
|
|
@ -49,6 +49,24 @@ Jinja filter`_:
|
|||
- context:
|
||||
data: {{ data|tojson }}
|
||||
|
||||
Another example where the new filter needs to be used is the following state example:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
grafana_packages:
|
||||
pkg.installed:
|
||||
- names: {{ server.pkgs }}
|
||||
|
||||
This will fail when pkgs is a list or dictionary. You will need to update the state:
|
||||
|
||||
.. code-block:: jinja
|
||||
|
||||
grafana_packages:
|
||||
pkg.installed:
|
||||
- names: {{ server.pkgs|tojson }}
|
||||
|
||||
This test case has also been tested with the ``yaml`` and ``json`` filters successfully.
|
||||
|
||||
.. note::
|
||||
This filter was added in Jinja 2.9. However, fear not! The 2018.3.3 release
|
||||
added a ``tojson`` filter which will be used if this filter is not already
|
||||
|
|
28
noxfile.py
28
noxfile.py
|
@ -9,7 +9,7 @@ Nox configuration script
|
|||
# Import Python libs
|
||||
import os
|
||||
import sys
|
||||
|
||||
import json
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.stderr.write('Do not execute this file directly. Use nox instead, it will know how to handle this file\n')
|
||||
|
@ -26,6 +26,14 @@ SITECUSTOMIZE_DIR = os.path.join(REPO_ROOT, 'tests', 'support', 'coverage')
|
|||
# We can't just import salt because if this is running under a frozen nox, there
|
||||
# will be no salt to import
|
||||
IS_WINDOWS = sys.platform.lower().startswith('win')
|
||||
REQUIREMENTS_OVERRIDES = {
|
||||
None: [
|
||||
'jsonschema <= 2.6.0'
|
||||
],
|
||||
'ubuntu-14.04': [
|
||||
'tornado < 5.0'
|
||||
]
|
||||
}
|
||||
|
||||
# Python versions to run against
|
||||
_PYTHON_VERSIONS = ('2', '2.7', '3', '3.4', '3.5', '3.6')
|
||||
|
@ -43,7 +51,25 @@ def _create_ci_directories():
|
|||
os.makedirs(path)
|
||||
|
||||
|
||||
def _install_requirements_overrides(session, *extra_requirements):
|
||||
session.install('distro')
|
||||
output = session.run('distro', '-j', silent=True)
|
||||
distro_data = json.loads(output.strip())
|
||||
|
||||
requirements_overrides = REQUIREMENTS_OVERRIDES[None]
|
||||
requirements_overrides.extend(
|
||||
REQUIREMENTS_OVERRIDES.get(
|
||||
'{id}-{version}'.format(**distro_data),
|
||||
[]
|
||||
)
|
||||
)
|
||||
if requirements_overrides:
|
||||
for requirement in requirements_overrides:
|
||||
session.install(requirement)
|
||||
|
||||
|
||||
def _install_requirements(session, *extra_requirements):
|
||||
_install_requirements_overrides(session)
|
||||
# Install requirements
|
||||
_requirements_files = [
|
||||
os.path.join(REPO_ROOT, 'requirements', 'pytest.txt')
|
||||
|
|
|
@ -20,7 +20,7 @@ Azure (ARM) Compute Execution Module
|
|||
:platform: linux
|
||||
|
||||
:configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments
|
||||
to every function in order to work properly.
|
||||
to every function in order to work properly.
|
||||
|
||||
Required provider parameters:
|
||||
|
||||
|
@ -37,7 +37,7 @@ to every function in order to work properly.
|
|||
|
||||
Optional provider parameters:
|
||||
|
||||
**cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.
|
||||
**cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.
|
||||
Possible values:
|
||||
* ``AZURE_PUBLIC_CLOUD`` (default)
|
||||
* ``AZURE_CHINA_CLOUD``
|
||||
|
|
|
@ -20,7 +20,7 @@ Azure (ARM) Network Execution Module
|
|||
:platform: linux
|
||||
|
||||
:configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments
|
||||
to every function in order to work properly.
|
||||
to every function in order to work properly.
|
||||
|
||||
Required provider parameters:
|
||||
|
||||
|
@ -37,7 +37,7 @@ to every function in order to work properly.
|
|||
|
||||
Optional provider parameters:
|
||||
|
||||
**cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.
|
||||
**cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.
|
||||
Possible values:
|
||||
* ``AZURE_PUBLIC_CLOUD`` (default)
|
||||
* ``AZURE_CHINA_CLOUD``
|
||||
|
|
|
@ -20,7 +20,7 @@ Azure (ARM) Resource Execution Module
|
|||
:platform: linux
|
||||
|
||||
:configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments
|
||||
to every function in order to work properly.
|
||||
to every function in order to work properly.
|
||||
|
||||
Required provider parameters:
|
||||
|
||||
|
@ -37,7 +37,7 @@ to every function in order to work properly.
|
|||
|
||||
Optional provider parameters:
|
||||
|
||||
**cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.
|
||||
**cloud_environment**: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.
|
||||
Possible values:
|
||||
* ``AZURE_PUBLIC_CLOUD`` (default)
|
||||
* ``AZURE_CHINA_CLOUD``
|
||||
|
|
|
@ -20,8 +20,8 @@ Azure (ARM) Compute State Module
|
|||
:platform: linux
|
||||
|
||||
:configuration: This module requires Azure Resource Manager credentials to be passed as a dictionary of
|
||||
keyword arguments to the ``connection_auth`` parameter in order to work properly. Since the authentication
|
||||
parameters are sensitive, it's recommended to pass them to the states via pillar.
|
||||
keyword arguments to the ``connection_auth`` parameter in order to work properly. Since the authentication
|
||||
parameters are sensitive, it's recommended to pass them to the states via pillar.
|
||||
|
||||
Required provider parameters:
|
||||
|
||||
|
@ -62,7 +62,7 @@ parameters are sensitive, it's recommended to pass them to the states via pillar
|
|||
|
||||
Example states using Azure Resource Manager authentication:
|
||||
|
||||
.. code-block:: yaml
|
||||
.. code-block:: jinja
|
||||
|
||||
{% set profile = salt['pillar.get']('azurearm:mysubscription') %}
|
||||
Ensure availability set exists:
|
||||
|
|
|
@ -20,8 +20,8 @@ Azure (ARM) Network State Module
|
|||
:platform: linux
|
||||
|
||||
:configuration: This module requires Azure Resource Manager credentials to be passed as a dictionary of
|
||||
keyword arguments to the ``connection_auth`` parameter in order to work properly. Since the authentication
|
||||
parameters are sensitive, it's recommended to pass them to the states via pillar.
|
||||
keyword arguments to the ``connection_auth`` parameter in order to work properly. Since the authentication
|
||||
parameters are sensitive, it's recommended to pass them to the states via pillar.
|
||||
|
||||
Required provider parameters:
|
||||
|
||||
|
@ -62,7 +62,7 @@ parameters are sensitive, it's recommended to pass them to the states via pillar
|
|||
|
||||
Example states using Azure Resource Manager authentication:
|
||||
|
||||
.. code-block:: yaml
|
||||
.. code-block:: jinja
|
||||
|
||||
{% set profile = salt['pillar.get']('azurearm:mysubscription') %}
|
||||
Ensure virtual network exists:
|
||||
|
|
|
@ -20,8 +20,8 @@ Azure (ARM) Resource State Module
|
|||
:platform: linux
|
||||
|
||||
:configuration: This module requires Azure Resource Manager credentials to be passed as a dictionary of
|
||||
keyword arguments to the ``connection_auth`` parameter in order to work properly. Since the authentication
|
||||
parameters are sensitive, it's recommended to pass them to the states via pillar.
|
||||
keyword arguments to the ``connection_auth`` parameter in order to work properly. Since the authentication
|
||||
parameters are sensitive, it's recommended to pass them to the states via pillar.
|
||||
|
||||
Required provider parameters:
|
||||
|
||||
|
@ -62,7 +62,7 @@ parameters are sensitive, it's recommended to pass them to the states via pillar
|
|||
|
||||
Example states using Azure Resource Manager authentication:
|
||||
|
||||
.. code-block:: yaml
|
||||
.. code-block:: jinja
|
||||
|
||||
{% set profile = salt['pillar.get']('azurearm:mysubscription') %}
|
||||
Ensure resource group exists:
|
||||
|
|
Loading…
Add table
Reference in a new issue