summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/inventory/yaml.py
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2017-09-08 11:08:31 -0700
committerToshio Kuratomi <a.badger@gmail.com>2017-09-11 18:34:09 -0700
commitcc343a4376a27927e0c7d31862dbb3108e101978 (patch)
treeaa2f036b3054e17cd74ac8d208cb396b5b342c19 /lib/ansible/plugins/inventory/yaml.py
parent9bc330c89b96be4482d5ab7d054ca43262ed7eb2 (diff)
downloadansible-cc343a4376a27927e0c7d31862dbb3108e101978.tar.gz
Port ansible doc for plugins to use DOCUMENTATION variables
* Using docstrings conflicts with the standard use of docstrings * PYTHON_OPTIMIZE=2 will omit docstrings. Using docstrings makes future changes to the plugin and module code subject to the requirement that we ensure it won't be run with optimization.
Diffstat (limited to 'lib/ansible/plugins/inventory/yaml.py')
-rw-r--r--lib/ansible/plugins/inventory/yaml.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ansible/plugins/inventory/yaml.py b/lib/ansible/plugins/inventory/yaml.py
index 2337fcf333..560d25d96b 100644
--- a/lib/ansible/plugins/inventory/yaml.py
+++ b/lib/ansible/plugins/inventory/yaml.py
@@ -1,8 +1,10 @@
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-'''
-DOCUMENTATION:
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = '''
inventory: yaml
version_added: "2.4"
short_description: Uses a specifically YAML file as inventory source.
@@ -20,7 +22,8 @@ DOCUMENTATION:
description: list of 'valid' extensions for files containing YAML
type: list
default: ['.yaml', '.yml', '.json']
-EXAMPLES:
+'''
+EXAMPLES = '''
all: # keys must be unique, i.e. only one 'hosts' per group
hosts:
test1:
@@ -46,9 +49,6 @@ all: # keys must be unique, i.e. only one 'hosts' per group
last_var: MYVALUE
'''
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
import re
import os