Merge pull request #27195 from jacobhammons/doc-build

Fixed sphinx / latex build warnings and errors
This commit is contained in:
Mike Place 2015-09-17 11:28:37 -06:00
commit 430c48c5ea
53 changed files with 563 additions and 456 deletions

View file

@ -25,7 +25,8 @@ Salt Table of Contents
topics/highavailability/index
topics/topology/index
topics/proxyminion/index
topics/transports/raet/index
topics/spm/index
topics/transports/index
topics/windows/index
topics/cloud/index
topics/netapi/index

View file

@ -1,4 +1,4 @@
.. _spm:
.. _spm-cli:
=======
``spm``

View file

@ -198,7 +198,7 @@ need to be changed to the ownership of the new user.
.. conf_minion:: sudo_user
``sudo_user``
--------
-------------
Default: ``''``

View file

@ -33,3 +33,4 @@ Reference
beacons/all/index
engines/all/index
sdb/all/index
serializers/all/index

View file

@ -25,6 +25,9 @@ Full list of builtin execution modules
at
augeas_cfg
aws_sqs
bamboohr
beacons
bigip
blockdev
bluez
boto_asg
@ -56,11 +59,13 @@ Full list of builtin execution modules
cmdmod
composer
config
consul
container_resource
cp
cpan
cron
cyg
cytest
daemontools
darwin_pkgutil
darwin_sysctl
@ -120,6 +125,7 @@ Full list of builtin execution modules
hosts
htpasswd
http
ifttt
ilo
img
incron
@ -177,6 +183,7 @@ Full list of builtin execution modules
nfs3
nftables
nginx
node
nova
npm
nspawn
@ -191,6 +198,7 @@ Full list of builtin execution modules
osxdesktop
pacman
pagerduty
pagerduty_util
pam
parted
pecl
@ -217,6 +225,7 @@ Full list of builtin execution modules
quota
rabbitmq
raet_publish
rallydev
random_org
rbenv
rdp
@ -230,6 +239,7 @@ Full list of builtin execution modules
rh_service
riak
rpm
rpmbuild
rsync
runit
rvm
@ -258,11 +268,13 @@ Full list of builtin execution modules
solarisips
solarispkg
solr
splay
splunk_search
sqlite3
ssh
state
status
stormpath
sudo
supervisord
svn
@ -274,19 +286,23 @@ Full list of builtin execution modules
system
system_profiler
systemd
temp
test
test_virtual
timezone
tls
tomcat
trafficserver
tuned
twilio_notify
udev
upstart
uptime
useradd
uwsgi
varnish
vbox_guest
victorops
virt
virtualenv_mod
win_autoruns
@ -301,6 +317,7 @@ Full list of builtin execution modules
win_ntp
win_path
win_pkg
win_powercfg
win_repo
win_servermanager
win_service
@ -310,6 +327,7 @@ Full list of builtin execution modules
win_timezone
win_update
win_useradd
win_wua
x509
xapi
xfs

View file

@ -19,6 +19,7 @@ Full list of builtin returner modules
elasticsearch_return
etcd_return
hipchat_return
influxdb_return
kafka_return
local
local_cache
@ -29,6 +30,7 @@ Full list of builtin returner modules
mysql
nagios_return
odbc
pgjsonb
postgres
postgres_local_cache
pushover_returner

View file

@ -31,6 +31,7 @@ Full list of runner modules
pkg
queue
sdb
ssh
search
state
survey

View file

@ -20,6 +20,8 @@ Full list of builtin state modules
at
augeas
aws_sqs
beacon
bigip
blockdev
boto_asg
boto_cfn
@ -52,10 +54,14 @@ Full list of builtin state modules
dockerio
dockerng
drac
elasticsearch_index
elasticsearch_index_template
environ
eselect
etcd_mod
event
file
firewalld
gem
git
glusterfs
@ -68,6 +74,7 @@ Full list of builtin state modules
host
htpasswd
http
ifttt
incron
influxdb_database
influxdb_user
@ -114,6 +121,7 @@ Full list of builtin state modules
pecl
pip_state
pkg
pkgbuild
pkgng
pkgrepo
portage_config
@ -122,6 +130,7 @@ Full list of builtin state modules
postgres_extension
postgres_group
postgres_schema
postgres_tablespace
postgres_user
powerpath
process
@ -151,6 +160,7 @@ Full list of builtin state modules
ssh_known_hosts
stateconf
status
stormpath_account
supervisord
svn
sysctl
@ -160,16 +170,19 @@ Full list of builtin state modules
timezone
tls
tomcat
trafficserver
tuned
uptime
user
vbox_guest
victorops
virtualenv_mod
win_dacl
win_dns_client
win_firewall
win_network
win_path
win_powercfg
win_servermanager
win_system
win_update

View file

@ -41,7 +41,7 @@ To install using the SaltStack yum repository:
Versions 6 / 7:
.. code-block:: config
.. code-block:: cfg
####################
# Enable SaltStack's package repository
@ -54,7 +54,7 @@ To install using the SaltStack yum repository:
Version 5:
.. code-block:: config
.. code-block:: cfg
####################
# Enable SaltStack's package repository

View file

@ -1,8 +1,8 @@
.. _proxy-minion:
===============================
Salt Proxy Minion Documentation
===============================
=================
Salt Proxy Minion
=================
Proxy minions are a developing Salt feature that enables controlling devices
that, for whatever reason, cannot run a standard salt-minion. Examples include
@ -507,3 +507,8 @@ And then in salt.proxy.rest_sample.py we find
return False
.. toctree::
:maxdepth: 2
:glob:
demo

View file

@ -1,3 +1,5 @@
:orphan:
=======================================
Salt Release Notes - Codename Boron
=======================================

View file

@ -1,3 +1,5 @@
:orphan:
.. _proxy-2015.8.0:
=========================

View file

@ -1,3 +1,5 @@
:orphan:
===========================================
Installing/Testing a Salt Release Candidate
===========================================

View file

@ -1,3 +1,5 @@
:orphan:
===============
Version Numbers
===============

View file

@ -333,3 +333,9 @@ The files in this type of package are configuration files for Salt, which
normally live in the ``/etc/salt/`` directory. Configuration files for packages
other than Salt can and should be handled with a Salt State (using a ``formula``
type of package).
.. toctree::
:maxdepth: 2
:glob:
dev

View file

@ -141,4 +141,6 @@ http://curvecp.org/
Programming Intro
=================
:ref:`Raet Programming Introduction <raet-programming>`
.. toctree:
programming_intro

View file

@ -39,6 +39,7 @@ Advanced Topics
:maxdepth: 2
walkthrough
rooted
minionfs
esky
multimaster
@ -50,6 +51,7 @@ Advanced Topics
writing_tests
http
lxc
stormpath
Salt Virt
==========

View file

@ -558,7 +558,7 @@ def create_config(kwargs=None, call=None):
def create_disk_from_distro(vm_, linode_id, swap_size=None):
'''
r'''
Creates the disk for the Linode from the distribution.
vm_
@ -601,7 +601,7 @@ def create_disk_from_distro(vm_, linode_id, swap_size=None):
def create_swap_disk(vm_, linode_id, swap_size=None):
'''
r'''
Creates the disk for the specified Linode.
vm_
@ -630,7 +630,7 @@ def create_swap_disk(vm_, linode_id, swap_size=None):
def create_private_ip(vm_, linode_id):
'''
r'''
Creates a private IP for the specified Linode.
vm_
@ -747,7 +747,7 @@ def get_datacenter_id(location):
def get_disk_size(vm_, swap):
'''
r'''
Returns the size of of the root disk in MB.
vm_
@ -761,7 +761,7 @@ def get_disk_size(vm_, swap):
def get_distribution_id(vm_):
'''
r'''
Returns the distribution ID for a VM
vm_
@ -890,7 +890,7 @@ def get_linode_id_from_name(name):
def get_password(vm_):
'''
r'''
Return the password to use for a VM.
vm_
@ -946,7 +946,7 @@ def get_private_ip(vm_):
def get_pub_key(vm_):
'''
r'''
Return the SSH pubkey.
vm_
@ -958,7 +958,7 @@ def get_pub_key(vm_):
def get_swap_size(vm_):
'''
r'''
Returns the amoutn of swap space to be used in MB.
vm_
@ -970,7 +970,7 @@ def get_swap_size(vm_):
def get_vm_size(vm_):
'''
r'''
Returns the VM's size.
vm_

View file

@ -902,14 +902,22 @@ def add_pool_member(hostname, username, password, name, member):
'''
A function to connect to a bigip device and add a new member to an existing pool.
Parameters:
hostname: The host/address of the bigip device
username: The iControl REST username
password: The iControl REST password
name: The name of the pool to modify
member: The name of the member to add
i.e. 10.1.1.2:80
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to modify
member
The name of the member to add
i.e. 10.1.1.2:80
CLI Example:
.. code-block:: bash
salt '*' bigip.add_pool_members bigip admin admin my-pool 10.2.2.1:80
'''

View file

@ -1015,6 +1015,7 @@ def create_internet_gateway(internet_gateway_name=None, vpc_id=None,
returns False if the internet gateways was not created.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash

View file

@ -114,6 +114,7 @@ The following options can be set in the :ref:`minion config
- nsenter
- lxc-attach
- docker-exec
See :ref:`Executing Commands Within a Running Container <docker-execution-driver>`.
Functions

View file

@ -1042,24 +1042,24 @@ def comment_line(path,
Comment or Uncomment a line in a text file.
:param path: string
The full path to the text file.
The full path to the text file.
:param regex: string
A regex expression that begins with ``^`` that will find the line you wish
to comment. Can be as simple as ``^color =``
A regex expression that begins with ``^`` that will find the line you wish
to comment. Can be as simple as ``^color =``
:param char: string
The character used to comment a line in the type of file you're referencing.
Default is ``#``
The character used to comment a line in the type of file you're referencing.
Default is ``#``
:param cmnt: boolean
True to comment the line. False to uncomment the line. Default is True.
True to comment the line. False to uncomment the line. Default is True.
:param backup: string
The file extension to give the backup file. Default is ``.bak``
The file extension to give the backup file. Default is ``.bak``
:return: boolean
Returns True if successful, False if not
Returns True if successful, False if not
CLI Example:
@ -1080,7 +1080,7 @@ def comment_line(path,
.. code-block:: bash
salt '*' file.comment_line 'C:\salt\conf\minion' '^log_level: (warning|info|debug)' '#' False '.bk'
salt '*' file.comment_line 'C:\salt\conf\minion' '^log_level: (warning|info|debug)' '#' False '.bk'
'''
# Get the regex for comment or uncomment
if cmnt:

View file

@ -885,7 +885,7 @@ def config_get_regexp(key,
ignore_retcode=False,
**kwargs):
r'''
.. versionaded:: 2015.8.0
.. versionadded:: 2015.8.0
Get the value of a key or keys in the git configuration file using regexes
for more flexible matching. The return data is a dictionary mapping keys to

View file

@ -221,6 +221,7 @@ def image_create(name, location=None, profile=None, visibility=None,
CLI Example, old format:
.. code-block:: bash
salt '*' glance.image_create name=f16-jeos is_public=true \\
disk_format=qcow2 container_format=ovf \\
copy_from=http://berrange.fedorapeople.org/\
@ -228,6 +229,8 @@ def image_create(name, location=None, profile=None, visibility=None,
CLI Example, new format resembling Glance API v2:
.. code-block:: bash
salt '*' glance.image_create name=f16-jeos visibility=public \\
disk_format=qcow2 container_format=ovf \\
copy_from=http://berrange.fedorapeople.org/\
@ -452,9 +455,9 @@ def image_update(id=None, name=None, profile=None, **kwargs): # pylint: disable
'''
Update properties of given image.
Known to work for:
- min_ram (in MB)
- protected (bool)
- visibility ('public' or 'private')
- min_ram (in MB)
- protected (bool)
- visibility ('public' or 'private')
'''
if id:
image = image_show(id=id)

View file

@ -607,7 +607,7 @@ def import_key(user=None,
text=None,
filename=None,
gnupghome=None):
'''
r'''
Import a key from text or file
user
@ -629,6 +629,7 @@ def import_key(user=None,
salt '*' gpg.import_key text='-----BEGIN PGP PUBLIC KEY BLOCK-----\n ... -----END PGP PUBLIC KEY BLOCK-----'
salt '*' gpg.import_key filename='/path/to/public-key-file'
'''
ret = {
'res': True,

View file

@ -81,7 +81,7 @@ def trigger_event(event=None, **kwargs):
CLI Example:
.. code-block:: yaml
TBA
'''
res = {'result': False, 'message': 'Something went wrong'}

View file

@ -193,7 +193,8 @@ def set_channel_access(channel=14, access_update_mode='non_volatile',
Set channel access
:param channel: number [1:7]
:param access_update_mode: one of
:param access_update_mode:
- 'dont_change' = don't set or change Channel Access
- 'non_volatile' = set non-volatile Channel Access
- 'volatile' = set volatile (active) setting of Channel Access
@ -683,21 +684,24 @@ def set_bootdev(bootdev='default', persist=False, uefiboot=False, **kwargs):
Set boot device to use on next reboot
:param bootdev:
*network -- Request network boot
*hd -- Boot from hard drive
*safe -- Boot from hard drive, requesting 'safe mode'
*optical -- boot from CD/DVD/BD drive
*setup -- Boot into setup utility
*default -- remove any IPMI directed boot device
request
- network: Request network boot
- hd: Boot from hard drive
- safe: Boot from hard drive, requesting 'safe mode'
- optical: boot from CD/DVD/BD drive
- setup: Boot into setup utility
- default: remove any IPMI directed boot device
request
:param persist: If true, ask that system firmware use this device
beyond next boot. Be aware many systems do not honor
this
:param uefiboot: If true, request UEFI boot explicitly. Strictly
speaking, the spec sugests that if not set, the system
should BIOS boot and offers no "don't care" option.
In practice, this flag not being set does not preclude
UEFI boot on any system I've encountered.
:param kwargs:
- api_host=127.0.0.1
- api_user=admin
@ -811,6 +815,7 @@ def get_users(channel=14, **kwargs):
get list of users and access information
:param channel: number [1:7]
:param kwargs:
- api_host=127.0.0.1
- api_user=admin
@ -819,15 +824,15 @@ def get_users(channel=14, **kwargs):
- api_kg=None
:return:
name: (str)
uid: (int)
channel: (int)
access:
- name: (str)
- uid: (int)
- channel: (int)
- access:
- callback (bool)
- link_auth (bool)
- ipmi_msg (bool)
- privilege_level: (str)[callback, user, operatorm administrator,
proprietary, no_access]
proprietary, no_access]
CLI Examples:

View file

@ -279,10 +279,10 @@ def list_sets(family='ipv4'):
def check_set(set=None, family='ipv4'):
'''
.. versionadded:: 2014.7.0
Check that given ipset set exists.
.. versionadded:: 2014.7.0
CLI Example:
.. code-block:: bash
@ -395,7 +395,7 @@ def check(set=None, entry=None, family='ipv4'):
An entry in the ipset. This parameter can be a single IP address, a
range of IP addresses, or a subnet block. Example:
.. code-block::
.. code-block:: cfg
192.168.0.1
192.168.0.2-192.168.0.19

View file

@ -268,8 +268,11 @@ def create_simple_binding(jboss_config, binding_name, value):
.. code-block:: bash
salt '*' jboss7.create_simple_binding '{"cli_path": "integration.modules.sysmod.SysModuleTest.test_valid_docs", "controller": "10.11.12.13:9999", "cli_user": "jbossadm", "cli_password": "jbossadm"}' my_binding_name my_binding_value
'''
salt '*' jboss7.create_simple_binding \\
'{"cli_path": "integration.modules.sysmod.SysModuleTest.test_valid_docs", \\
"controller": "10.11.12.13:9999", "cli_user": "jbossadm", "cli_password": "jbossadm"}' \\
my_binding_name my_binding_value
'''
log.debug("======================== MODULE FUNCTION: jboss7.create_simple_binding, binding_name=%s, value=%s", binding_name, value)
operation = '/subsystem=naming/binding="{binding_name}":add(binding-type=simple, value="{value}")'.format(
binding_name=binding_name,

View file

@ -2,21 +2,22 @@
'''
Manage Kerberos KDC
:configuration: In order to manage your KDC you will need to generate a keytab
that can authenticate without requireing a password.
:configuration:
In order to manage your KDC you will need to generate a keytab
that can authenticate without requiring a password.
.. code-block:: bash
.. code-block:: bash
# ktadd -k /root/secure.keytab kadmin/admin kadmin/changepw
# ktadd -k /root/secure.keytab kadmin/admin kadmin/changepw
On the KDC minion you will need to add the following to the minion
configuration file so Salt knows what keytab to use and what principal to
authenticate as.
.. code-block:: yaml
.. code-block:: yaml
auth_keytab: /root/auth.keytab
auth_principal: kadmin/admin
auth_keytab: /root/auth.keytab
auth_principal: kadmin/admin
'''
# Import python libs

View file

@ -424,7 +424,7 @@ def last(attrs=None, where=None):
def listening_ports(attrs=None, where=None):
'''
r'''
Return listening_ports_ information from osquery
CLI Example:
@ -437,7 +437,7 @@ def listening_ports(attrs=None, where=None):
def logged_in_users(attrs=None, where=None):
'''
r'''
Return logged_in_users_ information from osquery
CLI Example:
@ -450,7 +450,7 @@ def logged_in_users(attrs=None, where=None):
def mounts(attrs=None, where=None):
'''
r'''
Return mounts_ information from osquery
CLI Example:

View file

@ -150,7 +150,7 @@ def obfuscate(*args):
Here are some examples:
* ``'secret password'`` becomes ``'<str>'``
* ``['secret', 1]`` becomes ``['<str>', '<int>']
* ``['secret', 1]`` becomes ``['<str>', '<int>']``
* ``{'login': 'somelogin', 'pwd': 'secret'}`` becomes
``{'login': '<str>', 'pwd': '<str>'}``

View file

@ -213,10 +213,10 @@ def post_message(user=None,
:param user: The user or group to send to, must be key of user or group not email address.
:param message: The message to send to the PushOver user or group.
:param title: Specify who the message is from.
:param priority The priority of the message, defaults to 0.
:param expire The message should expire after N number of seconds.
:param retry The number of times the message should be retried.
:param sound The sound to associate with the message.
:param priority: The priority of the message, defaults to 0.
:param expire: The message should expire after N number of seconds.
:param retry: The number of times the message should be retried.
:param sound: The sound to associate with the message.
:param api_version: The PushOver API version, if not specified in the configuration.
:param token: The PushOver token, if not specified in the configuration.
:return: Boolean if message was sent successfully.

View file

@ -667,6 +667,7 @@ def generateBlobs(api_key=None,
**kwargs):
'''
List all Slack users.
:param api_key: The Random.org api key.
:param api_version: The Random.org api version.
:param format: Specifies the format in which the

View file

@ -108,20 +108,19 @@ def __virtual__():
def read_key(hkey, path, key=None):
'''
*** Incorrect Usage ***
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
.. important::
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
https://github.com/saltstack/salt/issues/25618
https://github.com/saltstack/salt/issues/25618
In order to not break existing state files this function will call the
read_value function if a key is passed. Key will be passed as the value
name. If key is not passed, this function will return the default value for
the key.
In order to not break existing state files this function will call the
read_value function if a key is passed. Key will be passed as the value
name. If key is not passed, this function will return the default value for
the key.
In the Boron release this function will be removed in favor of read_value.
***
In the Boron release this function will be removed in favor of read_value.
Read registry key value
@ -219,20 +218,19 @@ def read_value(hive, key, vname=None):
def set_key(hkey, path, value, key=None, vtype='REG_DWORD', reflection=True):
'''
*** Incorrect Usage ***
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
.. important ::
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
https://github.com/saltstack/salt/issues/25618
https://github.com/saltstack/salt/issues/25618
In order to not break existing state files this function will call the
set_value function if a key is passed. Key will be passed as the value
name. If key is not passed, this function will return the default value for
the key.
In order to not break existing state files this function will call the
set_value function if a key is passed. Key will be passed as the value
name. If key is not passed, this function will return the default value for
the key.
In the Boron release this function will be removed in favor of set_value.
***
In the Boron release this function will be removed in favor of set_value.
Set a registry key
@ -318,21 +316,20 @@ def set_value(hive, key, vname=None, vdata=None, vtype='REG_SZ', reflection=True
def create_key(hkey, path, key=None, value=None, reflection=True):
'''
*** Incorrect Usage ***
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
.. important ::
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
https://github.com/saltstack/salt/issues/25618
https://github.com/saltstack/salt/issues/25618
In order to not break existing state files this function will call the
set_value function if key is passed. Key will be passed as the value name.
If key is not passed, this function will return the default value for the
key.
In order to not break existing state files this function will call the
set_value function if key is passed. Key will be passed as the value name.
If key is not passed, this function will return the default value for the
key.
In the Boron release path will be removed and key will be the path. You will
not pass value.
***
In the Boron release path will be removed and key will be the path. You will
not pass value.
Create a registry key
@ -357,21 +354,20 @@ def create_key(hkey, path, key=None, value=None, reflection=True):
def delete_key(hkey, path, key=None, reflection=True, force=False):
'''
*** Incorrect Usage ***
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
.. important::
The name of this function is misleading and will be changed to reflect
proper usage in the Boron release of Salt. The path option will be removed
and the key will be the actual key. See the following issue:
https://github.com/saltstack/salt/issues/25618
https://github.com/saltstack/salt/issues/25618
In order to not break existing state files this function will call the
delete_value function if a key is passed. Key will be passed as the value
name. If key is not passed, this function will return the default value for
the key.
In order to not break existing state files this function will call the
delete_value function if a key is passed. Key will be passed as the value
name. If key is not passed, this function will return the default value for
the key.
In the Boron release path will be removed and key will be the path.
reflection will also be removed.
***
In the Boron release path will be removed and key will be the path.
reflection will also be removed.
Delete a registry key

View file

@ -48,19 +48,23 @@ def splay(*args, **kwargs):
Splay a salt function call execution time across minions over
a number of seconds (default: 600)
NOTE: You *probably* want to use --async here and look up the job results later.
If you're dead set on getting the output from the CLI command, then make
sure to set the timeout (with the -t flag) to something greater than the
splaytime (max splaytime + time to execute job).
Otherwise, it's very likely that the cli will time out before the job returns.
.. note::
You *probably* want to use --async here and look up the job results later.
If you're dead set on getting the output from the CLI command, then make
sure to set the timeout (with the -t flag) to something greater than the
splaytime (max splaytime + time to execute job).
Otherwise, it's very likely that the cli will time out before the job returns.
CLI Example:
# With default splaytime
salt --async '*' splay.splay pkg.install cowsay version=3.03-8.el6
CLI Examples:
# With specified splaytime (5 minutes) and timeout with 10 second buffer
.. code-block:: bash
salt --async '*' splay.splay pkg.install cowsay version=3.03-8.el6
.. code-block:: bash
# With specified splaytime (5 minutes) and timeout with 10 second buffer
salt -t 310 '*' splay.splay 300 pkg.version cowsay
'''
# Convert args tuple to a list so we can pop the splaytime and func out

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
'''
r'''
A salt module for SSL/TLS.
Can create a Certificate Authority (CA)
or use Self-Signed certificates.
@ -891,9 +891,9 @@ def create_csr(ca_name,
for the given req. source with a DNS: prefix. To be thorough, you
may want to include both DNS: and IP: entries if you are using
subjectAltNames for destinations for your TLS connections.
e.g.:
requests to https://1.2.3.4 will fail from python's
requests library w/out the second entry in the above list
e.g.:
requests to https://1.2.3.4 will fail from python's
requests library w/out the second entry in the above list
.. versionadded:: 2015.8.0
@ -901,17 +901,19 @@ def create_csr(ca_name,
Specify the general certificate type. Can be either `server` or
`client`. Indicates the set of common extensions added to the CSR.
server: {
'basicConstraints': 'CA:FALSE',
'extendedKeyUsage': 'serverAuth',
'keyUsage': 'digitalSignature, keyEncipherment'
}
.. code-block:: cfg
client: {
'basicConstraints': 'CA:FALSE',
'extendedKeyUsage': 'clientAuth',
'keyUsage': 'nonRepudiation, digitalSignature, keyEncipherment'
}
server: {
'basicConstraints': 'CA:FALSE',
'extendedKeyUsage': 'serverAuth',
'keyUsage': 'digitalSignature, keyEncipherment'
}
client: {
'basicConstraints': 'CA:FALSE',
'extendedKeyUsage': 'clientAuth',
'keyUsage': 'nonRepudiation, digitalSignature, keyEncipherment'
}
type_ext
boolean. Whether or not to extend the filename with CN_[cert_type]

View file

@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
'''
Interface to Red Hat tuned-adm module
:maintainer: Syed Ali <alicsyed@gmail.com>
:maturity: new
:depends: cmd.run
:depends: tuned-adm
:platform: Linux
'''

View file

@ -349,7 +349,7 @@ def get(path, objectType):
def add_ace(path, objectType, user, permission, acetype, propagation):
'''
r'''
add an ace to an object
path: path to the object (i.e. c:\\temp\\file, HKEY_LOCAL_MACHINE\\SOFTWARE\\KEY, etc)
@ -424,7 +424,7 @@ def add_ace(path, objectType, user, permission, acetype, propagation):
def rm_ace(path, objectType, user, permission, acetype, propagation):
'''
r'''
remove an ace to an object
path: path to the object (i.e. c:\\temp\\file, HKEY_LOCAL_MACHINE\\SOFTWARE\\KEY, etc)

View file

@ -490,11 +490,15 @@ def install(name=None, refresh=False, pkgs=None, saltenv='base', **kwargs):
If the package is installed by ``pkg.install``:
.. code-block:: cfg
{'<package>': {'old': '<old-version>',
'new': '<new-version>'}}
If the package is already installed:
.. code-block:: cfg
{'<package>': {'current': '<current-version>'}}
The following example will refresh the winrepo and install a single package,

View file

@ -246,7 +246,6 @@ def restart(name):
def create_win_salt_restart_task():
'''
Create a task in Windows task scheduler to enable restarting the salt-minion
CLI Example:
@ -395,7 +394,7 @@ def create(name,
obj=None,
password=None,
**kwargs):
'''
r'''
Create the named service.
.. versionadded:: 2015.8.0

View file

@ -11,7 +11,8 @@ Module for managing Windows Users
- win32security
- win32ts
NOTE: This currently only works with local user accounts, not domain accounts
.. note::
This currently only works with local user accounts, not domain accounts
'''
from __future__ import absolute_import
@ -69,36 +70,36 @@ def add(name,
Add a user to the minion.
:param str name:
User name
User name
:param str password:
User's password in plain text.
User's password in plain text.
:param str fullname:
The user's full name.
The user's full name.
:param str description:
A brief description of the user account.
A brief description of the user account.
:param list groups:
A list of groups to add the user to.
A list of groups to add the user to.
:param str home:
The path to the user's home directory.
The path to the user's home directory.
:param str homedrive:
The drive letter to assign to the home directory. Must be the Drive Letter
followed by a colon. ie: U:
The drive letter to assign to the home directory. Must be the Drive Letter
followed by a colon. ie: U:
:param str profile:
An explicit path to a profile. Can be a UNC or a folder on the system. If
left blank, windows uses it's default profile directory.
An explicit path to a profile. Can be a UNC or a folder on the system. If
left blank, windows uses it's default profile directory.
:param str logonscript:
Path to a login script to run when the user logs on.
Path to a login script to run when the user logs on.
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -154,32 +155,32 @@ def update(name,
.. versionadded:: 2015.8.0
:param str name:
The user name to update.
The user name to update.
:param str password:
New user password in plain text.
New user password in plain text.
:param str fullname:
The user's full name.
The user's full name.
:param str description:
A brief description of the user account.
A brief description of the user account.
:param str home:
The path to the user's home directory.
The path to the user's home directory.
:param str homedrive:
The drive letter to assign to the home directory. Must be the Drive Letter
followed by a colon. ie: U:
The drive letter to assign to the home directory. Must be the Drive Letter
followed by a colon. ie: U:
:param str logonscript:
The path to the logon script.
The path to the logon script.
:param str profile:
The path to the user's profile directory.
The path to the user's profile directory.
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -240,18 +241,18 @@ def delete(name,
Remove a user from the minion
:param str name:
The name of the user to delete
The name of the user to delete
:param bool purge:
Boolean value indicating that the user profile should also be removed when
the user account is deleted. If set to True the profile will be removed.
Boolean value indicating that the user profile should also be removed when
the user account is deleted. If set to True the profile will be removed.
:param bool force:
Boolean value indicating that the user account should be deleted even if the
user is logged in. True will log the user out and delete user.
Boolean value indicating that the user account should be deleted even if the
user is logged in. True will log the user out and delete user.
:return:
True if successful
True if successful
:rtype: bool
CLI Example:
@ -342,10 +343,10 @@ def getUserSid(username):
Get the Security ID for the user
:param str username:
user name for which to look up the SID
user name for which to look up the SID
:return:
Returns the user SID
Returns the user SID
:rtype: str
CLI Example:
@ -367,13 +368,13 @@ def setpassword(name, password):
Set the user's password
:param str name:
user name for which to set the password
user name for which to set the password
:param str password:
the new password
the new password
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -390,13 +391,13 @@ def addgroup(name, group):
Add user to a group
:param str name:
user name to add to the group
user name to add to the group
:param str group:
name of the group to which to add the user
name of the group to which to add the user
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -425,13 +426,13 @@ def removegroup(name, group):
Remove user from a group
:param str name:
user name to remove from the group
user name to remove from the group
:param str group:
name of the group from which to remove the user
name of the group from which to remove the user
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -463,16 +464,16 @@ def chhome(name, home, persist=False):
to the new home directory if the old home directory exist.
:param str name:
name of the user whose home directory you wish to change
name of the user whose home directory you wish to change
:param str home:
new location of the home directory
new location of the home directory
:param bool persist:
True to move the contents of the existing home directory to the new location
True to move the contents of the existing home directory to the new location
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -509,10 +510,10 @@ def chprofile(name, profile):
Change the profile directory of the user
:param str name:
name of the user whose profile you wish to change
name of the user whose profile you wish to change
:param str profile:
new location of the profile
new location of the profile
:return:
True if successful. False is unsuccessful.
@ -532,13 +533,13 @@ def chfullname(name, fullname):
Change the full name of the user
:param str name:
user name for which to change the full name
user name for which to change the full name
:param str fullname:
the new value for the full name
the new value for the full name
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -556,18 +557,18 @@ def chgroups(name, groups, append=True):
member of only the specified groups
:param str name:
user name for which to change groups
user name for which to change groups
:param groups:
a single group or a list of groups to assign to the user
:type: list, str
a single group or a list of groups to assign to the user
:type groups: list, str
:param bool append:
True adds the passed groups to the user's current groups
False sets the user's groups to the passed groups only
True adds the passed groups to the user's current groups
False sets the user's groups to the passed groups only
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:
@ -609,23 +610,23 @@ def info(name):
Return user information
:param str name:
Username for which to display information
Username for which to display information
:returns:
A dictionary containing user information
- fullname
- username
- SID
- passwd (will always return None)
- comment (same as description, left here for backwards compatibility)
- description
- active
- logonscript
- profile
- home
- homedrive
- groups
- gid
A dictionary containing user information
- fullname
- username
- SID
- passwd (will always return None)
- comment (same as description, left here for backwards compatibility)
- description
- active
- logonscript
- profile
- home
- homedrive
- groups
- gid
:rtype: dict
CLI Example:
@ -687,10 +688,10 @@ def list_groups(name):
Return a list of groups the named user belongs to
:param str name:
user name for which to list groups
user name for which to list groups
:return:
list of groups to which the user belongs
list of groups to which the user belongs
:rtype: list
CLI Example:
@ -715,11 +716,11 @@ def getent(refresh=False):
Return the list of all info for all users
:param bool refresh:
Refresh the cached user information. Default is False. Useful when used from
within a state function.
Refresh the cached user information. Default is False. Useful when used from
within a state function.
:return:
A dictionary containing information about all users on the system
A dictionary containing information about all users on the system
:rtype: dict
CLI Example:
@ -755,7 +756,7 @@ def list_users():
Return a list of users on Windows
:return:
list of users on the system
list of users on the system
:rtype: list
CLI Example:
@ -790,13 +791,13 @@ def rename(name, new_name):
Change the username for a named user
:param str name:
user name to change
user name to change
:param str new_name:
the new name for the current user
the new name for the current user
:return:
True if successful. False is unsuccessful.
True if successful. False is unsuccessful.
:rtype: bool
CLI Example:

View file

@ -261,46 +261,50 @@ def list_update(name=None,
"""
Returns details for all updates that match the search criteria
:param name: str
The name of the update you're searching for. This can be the GUID
(preferred), a KB number, or the full name of the update. Run list_updates
to get the GUID for the update you're looking for.
:param str name:
The name of the update you're searching for. This can be the GUID
(preferred), a KB number, or the full name of the update. Run list_updates
to get the GUID for the update you're looking for.
:param download: bool
:param bool download:
Download the update returned by this function. Run this function first
to see if the update exists, then set download=True to download the
update.
:param install: bool
:param bool install:
Install the update returned by this function. Run this function first
to see if the update exists, then set install=True to install the
update. This will override download=True
:return: dict
Returns a dict containing a list of updates that match the name if
download and install are both set to False. Should usually be a single
update, but can return multiple if a partial name is given. If download or
install is set to true it will return the results of
win_wua.download_updates::
:return:
Returns a dict containing a list of updates that match the name if
download and install are both set to False. Should usually be a single
update, but can return multiple if a partial name is given. If download or
install is set to true it will return the results of
win_wua.download_updates:
List of Updates:
{'<GUID>': {'Title': <title>,
'KB': <KB>,
'GUID': <the globally unique identifier for the update>
'Description': <description>,
'Downloaded': <has the update been downloaded>,
'Installed': <has the update been installed>,
'Mandatory': <is the update mandatory>,
'UserInput': <is user input required>,
'EULAAccepted': <has the EULA been accepted>,
'Severity': <update severity>,
'NeedsReboot': <is the update installed and awaiting reboot>,
'RebootBehavior': <will the update require a reboot>,
'Categories': [ '<category 1>',
'<category 2>',
...]
}
}
.. code-block:: cfg
List of Updates:
{'<GUID>': {'Title': <title>,
'KB': <KB>,
'GUID': <the globally unique identifier for the update>
'Description': <description>,
'Downloaded': <has the update been downloaded>,
'Installed': <has the update been installed>,
'Mandatory': <is the update mandatory>,
'UserInput': <is user input required>,
'EULAAccepted': <has the EULA been accepted>,
'Severity': <update severity>,
'NeedsReboot': <is the update installed and awaiting reboot>,
'RebootBehavior': <will the update require a reboot>,
'Categories': [ '<category 1>',
'<category 2>',
...]
}
}
:return type: dict
CLI Examples:
@ -392,31 +396,31 @@ def list_updates(software=True,
"""
Returns a detailed list of available updates or a summary
:param software: bool
:param bool software:
Include software updates in the results (default is True)
:param drivers: bool
:param bool drivers:
Include driver updates in the results (default is False)
:param summary: bool
:param bool summary:
True: Return a summary of updates available for each category.\
False (default): Return a detailed list of available updates.
:param installed: bool
:param bool installed:
Include installed updates in the results (default if False)
:param download: bool
:param bool download:
(Overrides reporting functionality) Download the list of updates
returned by this function. Run this function first to see what will be
installed, then set download=True to download the updates.
:param install: bool
:param bool install:
(Overrides reporting functionality) Install the list of updates
returned by this function. Run this function first to see what will be
installed, then set install=True to install the updates. This will
override download=True
:param categories: list
:param list categories:
Specify the categories to list. Must be passed as a list. All
categories returned by default.
@ -436,7 +440,7 @@ def list_updates(software=True,
* Windows 8.1 and later drivers
* Windows Defender
:param severities: list
:param list severities:
Specify the severities to include. Must be passed as a list. All
severities returned by default.
@ -446,36 +450,39 @@ def list_updates(software=True,
* Important
:return:
Returns a dict containing either a summary or a list of updates::
Returns a dict containing either a summary or a list of updates:
List of Updates:
{'<GUID>': {'Title': <title>,
'KB': <KB>,
'GUID': <the globally uinique identifier for the update>
'Description': <description>,
'Downloaded': <has the update been downloaded>,
'Installed': <has the update been installed>,
'Mandatory': <is the update mandatory>,
'UserInput': <is user input required>,
'EULAAccepted': <has the EULA been accepted>,
'Severity': <update severity>,
'NeedsReboot': <is the update installed and awaiting reboot>,
'RebootBehavior': <will the update require a reboot>,
'Categories': [ '<category 1>',
'<category 2>',
...]
}
}
.. code-block:: cfg
Summary of Updates:
{'Total': <total number of updates returned>,
'Available': <updates that are not downloaded or installed>,
'Downloaded': <updates that are downloaded but not installed>,
'Installed': <updates installed (usually 0 unless installed=True)>,
'Categories': { <category 1>: <total for that category>,
<category 2>: <total for category 2>,
... }
}
List of Updates:
{'<GUID>': {'Title': <title>,
'KB': <KB>,
'GUID': <the globally uinique identifier for the update>
'Description': <description>,
'Downloaded': <has the update been downloaded>,
'Installed': <has the update been installed>,
'Mandatory': <is the update mandatory>,
'UserInput': <is user input required>,
'EULAAccepted': <has the EULA been accepted>,
'Severity': <update severity>,
'NeedsReboot': <is the update installed and awaiting reboot>,
'RebootBehavior': <will the update require a reboot>,
'Categories': [ '<category 1>',
'<category 2>',
...]
}
}
Summary of Updates:
{'Total': <total number of updates returned>,
'Available': <updates that are not downloaded or installed>,
'Downloaded': <updates that are downloaded but not installed>,
'Installed': <updates installed (usually 0 unless installed=True)>,
'Categories': { <category 1>: <total for that category>,
<category 2>: <total for category 2>,
... }
}
:return type: dict
CLI Examples:
@ -934,26 +941,26 @@ def set_wu_settings(level=None,
Change Windows Update settings. If no parameters are passed, the current
value will be returned.
:param level: int
:param int level:
Number from 1 to 4 indicating the update level:
1. Never check for updates
2. Check for updates but let me choose whether to download and install them
3. Download updates but let me choose whether to install them
4. Install updates automatically
:param recommended: bool
:param bool recommended:
Boolean value that indicates whether to include optional or recommended
updates when a search for updates and installation of updates is
performed.
:param featured: bool
:param bool featured:
Boolean value that indicates whether to display notifications for
featured updates.
:param elevated: bool
:param bool elevated:
Boolean value that indicates whether non-administrators can perform some
update-related actions without administrator approval.
:param msupdate: bool
:param bool msupdate:
Boolean value that indicates whether to turn on Microsoft Update for
other Microsoft products
:param day: str
:param str day:
Days of the week on which Automatic Updates installs or uninstalls
updates.
Accepted values:
@ -964,7 +971,7 @@ def set_wu_settings(level=None,
- Thursday
- Friday
- Saturday
:param time: str
:param str time:
Time at which Automatic Updates installs or uninstalls updates. Must be
in the ##:## 24hr format, eg. 3:00 PM would be 15:00
@ -1118,39 +1125,39 @@ def get_wu_settings():
Get current Windows Update settings.
:return:
Featured Updates:
Boolean value that indicates whether to display notifications for
featured updates.
Group Policy Required (Read-only):
Boolean value that indicates whether Group Policy requires the Automatic
Updates service.
Microsoft Update:
Boolean value that indicates whether to turn on Microsoft Update for
other Microsoft Products
Needs Reboot:
Boolean value that indicates whether the machine is in a reboot pending
state.
Non Admins Elevated:
Boolean value that indicates whether non-administrators can perform some
update-related actions without administrator approval.
Notification Level:
Number 1 to 4 indicating the update level:
1. Never check for updates
2. Check for updates but let me choose whether to download and install them
3. Download updates but let me choose whether to install them
4. Install updates automatically
Read Only (Read-only):
Boolean value that indicates whether the Automatic Update
settings are read-only.
Recommended Updates:
Boolean value that indicates whether to include optional or recommended
updates when a search for updates and installation of updates is
performed.
Scheduled Day:
Days of the week on which Automatic Updates installs or uninstalls
updates.
Scheduled Time:
Time at which Automatic Updates installs or uninstalls updates.
Featured Updates:
Boolean value that indicates whether to display notifications for
featured updates.
Group Policy Required (Read-only):
Boolean value that indicates whether Group Policy requires the Automatic
Updates service.
Microsoft Update:
Boolean value that indicates whether to turn on Microsoft Update for
other Microsoft Products
Needs Reboot:
Boolean value that indicates whether the machine is in a reboot pending
state.
Non Admins Elevated:
Boolean value that indicates whether non-administrators can perform some
update-related actions without administrator approval.
Notification Level:
Number 1 to 4 indicating the update level:
1. Never check for updates
2. Check for updates but let me choose whether to download and install them
3. Download updates but let me choose whether to install them
4. Install updates automatically
Read Only (Read-only):
Boolean value that indicates whether the Automatic Update
settings are read-only.
Recommended Updates:
Boolean value that indicates whether to include optional or recommended
updates when a search for updates and installation of updates is
performed.
Scheduled Day:
Days of the week on which Automatic Updates installs or uninstalls
updates.
Scheduled Time:
Time at which Automatic Updates installs or uninstalls updates.
CLI Examples:

View file

@ -1915,21 +1915,21 @@ class WebsocketEndpoint(object):
.. http:get:: /ws/(token)
:query format_events: The event stream will undergo server-side
formatting if the ``format_events`` URL parameter is included
in the request. This can be useful to avoid formatting on the
client-side:
:query format_events: The event stream will undergo server-side
formatting if the ``format_events`` URL parameter is included
in the request. This can be useful to avoid formatting on the
client-side:
.. code-block:: bash
.. code-block:: bash
curl -NsS <...snip...> localhost:8000/ws?format_events
curl -NsS <...snip...> localhost:8000/ws?format_events
:reqheader X-Auth-Token: an authentication token from
:py:class:`~Login`.
:reqheader X-Auth-Token: an authentication token from
:py:class:`~Login`.
:status 101: switching to the websockets protocol
:status 401: |401|
:status 406: |406|
:status 101: switching to the websockets protocol
:status 401: |401|
:status 406: |406|
**Example request:**

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Floris Bruynooghe <flub@devork.be>
'''
r'''
Use remote Mercurial repository as a Pillar source.
.. versionadded:: 2015.8.0

View file

@ -20,66 +20,72 @@ Return data to a cassandra server
IP address. No assumption or default will be used for the cluster IPs.
The cluster IPs will be tried in the order listed. The port, username,
and password values shown below will be the assumed defaults if you do
not provide values.::
not provide values.:
cassandra:
cluster:
- 192.168.50.11
- 192.168.50.12
- 192.168.50.13
port: 9042
username: salt
password: salt
.. code-block:: yaml
Use the following cassandra database schema::
cassandra:
cluster:
- 192.168.50.11
- 192.168.50.12
- 192.168.50.13
port: 9042
username: salt
password: salt
CREATE KEYSPACE IF NOT EXISTS salt
WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};
Use the following cassandra database schema:
CREATE USER IF NOT EXISTS salt WITH PASSWORD 'salt' NOSUPERUSER;
.. code-block:: sql
GRANT ALL ON KEYSPACE salt TO salt;
CREATE KEYSPACE IF NOT EXISTS salt
WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1};
USE salt;
CREATE USER IF NOT EXISTS salt WITH PASSWORD 'salt' NOSUPERUSER;
CREATE TABLE IF NOT EXISTS salt.salt_returns (
jid text,
minion_id text,
fun text,
alter_time timestamp,
full_ret text,
return text,
success boolean,
PRIMARY KEY (jid, minion_id, fun)
) WITH CLUSTERING ORDER BY (minion_id ASC, fun ASC);
CREATE INDEX IF NOT EXISTS salt_returns_minion_id ON salt.salt_returns (minion_id);
CREATE INDEX IF NOT EXISTS salt_returns_fun ON salt.salt_returns (fun);
GRANT ALL ON KEYSPACE salt TO salt;
CREATE TABLE IF NOT EXISTS salt.jids (
jid text PRIMARY KEY,
load text
);
USE salt;
CREATE TABLE IF NOT EXISTS salt.minions (
minion_id text PRIMARY KEY,
last_fun text
);
CREATE INDEX IF NOT EXISTS minions_last_fun ON salt.minions (last_fun);
CREATE TABLE IF NOT EXISTS salt.salt_returns (
jid text,
minion_id text,
fun text,
alter_time timestamp,
full_ret text,
return text,
success boolean,
PRIMARY KEY (jid, minion_id, fun)
) WITH CLUSTERING ORDER BY (minion_id ASC, fun ASC);
CREATE INDEX IF NOT EXISTS salt_returns_minion_id ON salt.salt_returns (minion_id);
CREATE INDEX IF NOT EXISTS salt_returns_fun ON salt.salt_returns (fun);
CREATE TABLE IF NOT EXISTS salt.salt_events (
id timeuuid,
tag text,
alter_time timestamp,
data text,
master_id text,
PRIMARY KEY (id, tag)
) WITH CLUSTERING ORDER BY (tag ASC);
CREATE INDEX tag ON salt.salt_events (tag);
CREATE TABLE IF NOT EXISTS salt.jids (
jid text PRIMARY KEY,
load text
);
CREATE TABLE IF NOT EXISTS salt.minions (
minion_id text PRIMARY KEY,
last_fun text
);
CREATE INDEX IF NOT EXISTS minions_last_fun ON salt.minions (last_fun);
CREATE TABLE IF NOT EXISTS salt.salt_events (
id timeuuid,
tag text,
alter_time timestamp,
data text,
master_id text,
PRIMARY KEY (id, tag)
) WITH CLUSTERING ORDER BY (tag ASC);
CREATE INDEX tag ON salt.salt_events (tag);
Required python modules: cassandra-driver
To use the cassandra returner, append '--return cassandra' to the salt command. ex:
To use the cassandra returner, append '--return cassandra' to the salt command. ex:
.. code-block:: bash
salt '*' test.ping --return cassandra
'''

View file

@ -23,7 +23,7 @@ def cmd(
Execute a single command via the salt-ssh subsystem and return all
routines at once
.. versionaddedd:: 2015.2
.. versionadded:: 2015.2
A wrapper around the :py:meth:`SSHClient.cmd
<salt.client.ssh.client.SSHClient.cmd>` method.

View file

@ -172,7 +172,7 @@ def event(tagmatch='*', count=-1, quiet=False, sock_dir=None, pretty=False):
.. seealso::
See :glob:`tests/eventlisten.sh` for an example of usage within a shell
See :blob:`tests/eventlisten.sh` for an example of usage within a shell
script.
'''
sevent = salt.utils.event.get_event(

View file

@ -1,39 +1,40 @@
# -*- coding: utf-8 -*-
'''
Connection module for Amazon Cloud Formation
Connection module for Amazon Cloud Formation
.. versionadded:: 2015.8.0
.. versionadded:: 2015.8.0
:configuration: This module accepts explicit AWS credentials but can also utilize
IAM roles assigned to the instance trough Instance Profiles. Dynamic
:depends: boto
:configuration: This module accepts explicit AWS credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no further
configuration is necessary. More Information available at::
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
configuration is necessary. More Information available at
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in a pillar or
in the minion's config file::
in the minion's config file:
.. code-block:: yaml
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
.. code-block:: yaml
stack-present:
boto_cfn.present:
- name: mystack
- template_body: salt://base/mytemplate.json
- disable_rollback: true
- region: eu-west-1
- keyid: 'AKIAJHTMIQ2ASDFLASDF'
- key: 'fdkjsafkljsASSADFalkfjasdf'
stack-present:
boto_cfn.present:
- name: mystack
- template_body: salt://base/mytemplate.json
- disable_rollback: true
- region: eu-west-1
- keyid: 'AKIAJHTMIQ2ASDFLASDF'
- key: 'fdkjsafkljsASSADFalkfjasdf'
.. code-block:: yaml
stack-absent:
boto_cfn.absent:
- name: mystack
:depends: boto
stack-absent:
boto_cfn.absent:
- name: mystack
'''
from __future__ import absolute_import
@ -116,6 +117,8 @@ def present(name, template_body=None, template_url=None, parameters=None, notifi
profile (dict) - A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key
and keyid.
.. _ sns_console: https://console.aws.amazon.com/sns
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}

View file

@ -38,43 +38,41 @@ pillars or minion config:
.. code-block:: yaml
Ensure DynamoDB table does not exist:
boto_dynamodb.absent:
- table_name: new_table
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
- region: us-east-1
Ensure DynamoDB table exists:
boto_dynamodb.present:
- table_name: new_table
- read_capacity_units: 1
- write_capacity_units: 2
- hash_key: primary_id
- hash_key_data_type: N
- range_key: start_timestamp
- range_key_data_type: N
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
- region: us-east-1
- local_indexes:
- index:
- name: "primary_id_end_timestamp_index"
- hash_key: primary_id
- hash_key_data_type: N
- range_key: end_timestamp
- range_key_data_type: N
- global_indexes:
- index:
- name: "name_end_timestamp_index"
- hash_key: name
- hash_key_data_type: S
- range_key: end_timestamp
- range_key_data_type: N
- read_capacity_units: 3
- write_capacity_units: 4
Ensure DynamoDB table does not exist:
boto_dynamodb.absent:
- table_name: new_table
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
- region: us-east-1
Ensure DynamoDB table exists:
boto_dynamodb.present:
- table_name: new_table
- read_capacity_units: 1
- write_capacity_units: 2
- hash_key: primary_id
- hash_key_data_type: N
- range_key: start_timestamp
- range_key_data_type: N
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
- region: us-east-1
- local_indexes:
- index:
- name: "primary_id_end_timestamp_index"
- hash_key: primary_id
- hash_key_data_type: N
- range_key: end_timestamp
- range_key_data_type: N
- global_indexes:
- index:
- name: "name_end_timestamp_index"
- hash_key: name
- hash_key_data_type: S
- range_key: end_timestamp
- range_key_data_type: N
- read_capacity_units: 3
- write_capacity_units: 4
'''
# Import Python libs
from __future__ import absolute_import

View file

@ -374,12 +374,12 @@ def register_instances(name, instances, region=None, key=None, keyid=None,
.. code-block:: yaml
add-instances:
boto_elb.register_instances:
- name: myloadbalancer
- instances:
- instance-id1
- instance-id2
add-instances:
boto_elb.register_instances:
- name: myloadbalancer
- instances:
- instance-id1
- instance-id2
'''
ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
ret['name'] = name

View file

@ -7,7 +7,7 @@ Schedules and users can be referenced by pagerduty ID, or by name, or by email a
For example:
.. code-block:: yaml
.. code-block:: yaml
ensure test escalation policy:
pagerduty_escalation_policy.present:

View file

@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
'''
Interface to Red Hat tuned-adm module
:maintainer: Syed Ali <alicsyed@gmail.com>
:maturity: new
:depends: cmd.run