Merge pull request #1 from ansible/devel

update from origin
pull/12679/head
yfix 9 years ago
commit cf7763ab46

@ -109,6 +109,7 @@ New Modules:
* amazon: s3_lifecycle
* amazon: s3_logging
* apk
* bigip_gtm_wide_ip
* bundler
* centurylink: clc_blueprint_package
* centurylink: clc_firewall_policy
@ -155,7 +156,9 @@ New Modules:
* openstack: os_client_config
* openstack: os_floating_ip
* openstack: os_image
* openstack: os_image_facts
* openstack: os_network
* openstack: os_network_facts
* openstack: os_nova_flavor
* openstack: os_object
* openstack: os_router
@ -285,6 +288,7 @@ you avoid ever writing sensitive plaintext to disk.
* ansible-vault rekey accepts the --new-vault-password-file option.
* Configuration items defined as paths (local only) now all support shell style interpolations.
* Many fixes and new options added to modules, too many to list here.
* Now you can see task file and line number when using verbosity of 3 or above.
## 1.9.2 "Dancing In the Street" - Jun 26, 2015

@ -509,7 +509,7 @@ Windows modules checklist
* Favour native powershell and .net ways of doing things over calls to COM libraries or calls to native executables which may or may not be present in all versions of windows
* modules are in powershell (.ps1 files) but the docs reside in same name python file (.py)
* look at ansible/lib/ansible/module_utils/powershell.ps1 for common code, avoid duplication
* Ansible uses strictmode so be sure to test with that enabled
* Ansible uses strictmode version 2.0 so be sure to test with that enabled
* start with::
#!powershell

@ -36,7 +36,6 @@ privilege escalation for all the enclosed tasks.
Error Handling
``````````````
About Blocks
Blocks also introduce the ability to handle errors in a way similar to exceptions in most programming languages.
.. code-block:: YAML

@ -528,10 +528,17 @@ To escape special characters within a regex, use the "regex_escape" filter::
# convert '^f.*o(.*)$' to '\^f\.\*o\(\.\*\)\$'
{{ '^f.*o(.*)$' | regex_escape() }}
To make use of one attribute from each item in a list of complex variables, use the "map" filter (see the `Jinja2 map() docs`_ for more)::
# get a comma-separated list of the mount points (e.g. "/,/mnt/stuff") on a host
{{ ansible_mounts|map(attribute='mount')|join(',') }}
A few useful filters are typically added with each new Ansible release. The development documentation shows
how to extend Ansible filters by writing your own as plugins, though in general, we encourage new ones
to be added to core so everyone can make use of them.
.. _Jinja2 map() docs: http://jinja.pocoo.org/docs/dev/templates/#map
.. _builtin filters: http://jinja.pocoo.org/docs/templates/#builtin-filters
.. seealso::

@ -203,6 +203,7 @@ default empty string return value if the key is not in the ini file
The Credstash Lookup
````````````````````
.. versionadded:: 2.0
Credstash is a small utility for managing secrets using AWS's KMS and DynamoDB: https://github.com/LuminalOSS/credstash
@ -233,7 +234,9 @@ You can specify regions or tables to fetch secrets from::
- name: "Test credstash lookup plugin -- get the company's github password"
debug: msg="Credstash lookup! {{ lookup('credstash', 'company-github-password', table='company-passwords') }}"
If you're not using 2.0 yet, you can do something similar with the credstash tool and the pipe lookup (see below)::
debug: msg="Poor man's credstash lookup! {{ lookup('pipe', 'credstash -r us-west-1 get my-other-password') }}"
.. _more_lookups:

@ -167,8 +167,8 @@ class GalaxyCLI(CLI):
force = self.get_opt('force', False)
offline = self.get_opt('offline', False)
role_name = self.args.pop(0).strip()
if role_name == "":
role_name = self.args.pop(0).strip() if self.args else None
if not role_name:
raise AnsibleOptionsError("- no role name specified for init")
role_path = os.path.join(init_path, role_name)
if os.path.exists(role_path):
@ -347,7 +347,7 @@ class GalaxyCLI(CLI):
# install dependencies, if we want them
if not no_deps and installed:
role_dependencies = role.metadata.get('dependencies', [])
role_dependencies = role.metadata.get('dependencies') or []
for dep in role_dependencies:
self.display.debug('Installing dep %s' % dep)
dep_req = RoleRequirement()

@ -26,7 +26,7 @@
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
Set-StrictMode -Version Latest
Set-StrictMode -Version 2.0
# Ansible v2 will insert the module arguments below as a string containing
# JSON; assign them to an environment variable and redefine $args so existing

@ -101,6 +101,12 @@ class Task(Base, Conditional, Taggable, Become):
super(Task, self).__init__()
def get_path(self):
''' return the absolute path of the task with its line number '''
if hasattr(self, '_ds'):
return "%s:%s" % (self._ds._data_source, self._ds._line_number)
def get_name(self):
''' return the name of the task '''

@ -110,6 +110,10 @@ class CallbackModule(CallbackBase):
def v2_playbook_on_task_start(self, task, is_conditional):
self._display.banner("TASK [%s]" % task.get_name().strip())
if self._display.verbosity > 3:
path = task.get_path()
if path:
self._display.display("task path: %s" % path, color='dark gray')
def v2_playbook_on_cleanup_task_start(self, task):
self._display.banner("CLEANUP TASK [%s]" % task.get_name().strip())

@ -0,0 +1,29 @@
# (c) 2015, Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class ModuleDocFragment(object):
# EC2 only documentation fragment
DOCUMENTATION = """
options:
region:
description:
- The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See U(http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region)
required: false
aliases: [ 'aws_region', 'ec2_region' ]
"""
Loading…
Cancel
Save