mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #35700 from rallytime/merge-2016.3
[2016.3] Merge forward from 2015.8 to 2016.3
This commit is contained in:
commit
5d0b9a248e
@ -6,42 +6,54 @@ Note that long polling is utilized to avoid excessive CPU usage.
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
:configuration:
|
||||
This engine can be run on the master or on a minion.
|
||||
|
||||
Example Config:
|
||||
engines:
|
||||
- sqs_events:
|
||||
queue: test
|
||||
profile: my-sqs-profile #optional
|
||||
|
||||
Explicit sqs credentials are accepted but this engine 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
|
||||
|
||||
If IAM roles are not used you need to specify them either in a pillar or
|
||||
in the config file of the master or minion, as appropriate::
|
||||
|
||||
sqs.keyid: GKTADJGHEIQSXMKKRBJ08H
|
||||
sqs.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
|
||||
|
||||
A region may also be specified in the configuration::
|
||||
|
||||
sqs.region: us-east-1
|
||||
|
||||
If a region is not specified, the default is us-east-1.
|
||||
|
||||
It's also possible to specify key, keyid and region via a profile:
|
||||
|
||||
myprofile:
|
||||
keyid: GKTADJGHEIQSXMKKRBJ08H
|
||||
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
|
||||
region: us-east-1
|
||||
|
||||
:depends: boto
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
This engine can be run on the master or on a minion.
|
||||
|
||||
Example Config:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
engines:
|
||||
- sqs_events:
|
||||
queue: test
|
||||
profile: my-sqs-profile #optional
|
||||
|
||||
Explicit sqs credentials are accepted but this engine 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
|
||||
|
||||
If IAM roles are not used you need to specify them either in a pillar or
|
||||
in the config file of the master or minion, as appropriate:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sqs.keyid: GKTADJGHEIQSXMKKRBJ08H
|
||||
sqs.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
|
||||
|
||||
A region may also be specified in the configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sqs.region: us-east-1
|
||||
|
||||
If a region is not specified, the default is us-east-1.
|
||||
|
||||
It's also possible to specify key, keyid and region via a profile:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
myprofile:
|
||||
keyid: GKTADJGHEIQSXMKKRBJ08H
|
||||
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
|
||||
region: us-east-1
|
||||
|
||||
'''
|
||||
|
||||
# Import python libs
|
||||
|
@ -153,7 +153,7 @@ class GitProvider(object):
|
||||
self.id = next(iter(remote))
|
||||
self.get_url()
|
||||
per_remote_conf = dict(
|
||||
[(key, six.text_type(val)) for key, val in
|
||||
[(key, str(val)) for key, val in
|
||||
six.iteritems(salt.utils.repack_dictlist(remote[self.id]))]
|
||||
)
|
||||
if not per_remote_conf:
|
||||
@ -2016,7 +2016,7 @@ class GitBase(object):
|
||||
'a bug, please report it.'.format(key)
|
||||
)
|
||||
failhard(self.role)
|
||||
per_remote_defaults[param] = six.text_type(self.opts[key])
|
||||
per_remote_defaults[param] = str(self.opts[key])
|
||||
|
||||
self.remotes = []
|
||||
for remote in remotes:
|
||||
@ -2132,7 +2132,7 @@ class GitBase(object):
|
||||
continue
|
||||
except TypeError:
|
||||
# remote was non-string, try again
|
||||
if not fnmatch.fnmatch(repo.url, six.text_type(remote)):
|
||||
if not fnmatch.fnmatch(repo.url, str(remote)):
|
||||
continue
|
||||
success, failed = repo.clear_lock(lock_type=lock_type)
|
||||
cleared.extend(success)
|
||||
@ -2177,7 +2177,7 @@ class GitBase(object):
|
||||
continue
|
||||
except TypeError:
|
||||
# remote was non-string, try again
|
||||
if not fnmatch.fnmatch(repo.url, six.text_type(remote)):
|
||||
if not fnmatch.fnmatch(repo.url, str(remote)):
|
||||
continue
|
||||
success, failed = repo.lock()
|
||||
locked.extend(success)
|
||||
|
Loading…
Reference in New Issue
Block a user