summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2017-01-07 08:50:10 -0800
committerToshio Kuratomi <a.badger@gmail.com>2017-01-07 13:00:15 -0800
commitaee66d7b5b74651acd4e2c5de8a9e2b02f2a0fc5 (patch)
tree322f7b591cbbd8349ac68f3e04a9aa0168aab360
parentadb7426c0c3e52db719c388f51a8bb4aadf453e7 (diff)
downloadansible-docs-code-block-fixes.tar.gz
Fix code-blocks to use correct syntax highlightingdocs-code-block-fixes
-rw-r--r--docs/docsite/rst/dev_guide/developing_modules.rst2
-rw-r--r--docs/docsite/rst/dev_guide/developing_test_pr.rst2
-rw-r--r--docs/docsite/rst/playbooks_filters.rst2
-rw-r--r--hacking/templates/rst.j22
-rw-r--r--lib/ansible/modules/cloud/amazon/cloudformation_facts.py32
-rw-r--r--lib/ansible/modules/cloud/misc/xenserver_facts.py14
-rw-r--r--lib/ansible/modules/cloud/vmware/vsphere_guest.py2
-rw-r--r--lib/ansible/modules/files/find.py6
-rw-r--r--lib/ansible/modules/files/lineinfile.py7
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_binding.py2
-rw-r--r--lib/ansible/modules/network/basics/slurp.py23
-rw-r--r--lib/ansible/modules/network/nmcli.py295
-rw-r--r--lib/ansible/modules/packaging/os/dnf.py2
-rw-r--r--lib/ansible/modules/packaging/os/openbsd_pkg.py2
-rw-r--r--lib/ansible/modules/packaging/os/portage.py4
-rw-r--r--lib/ansible/modules/packaging/os/zypper.py4
-rw-r--r--lib/ansible/modules/packaging/os/zypper_repository.py2
-rw-r--r--lib/ansible/modules/system/pam_limits.py2
-rw-r--r--lib/ansible/modules/windows/win_iis_website.py54
-rw-r--r--lib/ansible/modules/windows/win_unzip.py8
20 files changed, 244 insertions, 223 deletions
diff --git a/docs/docsite/rst/dev_guide/developing_modules.rst b/docs/docsite/rst/dev_guide/developing_modules.rst
index 37bf84165f..302ae426af 100644
--- a/docs/docsite/rst/dev_guide/developing_modules.rst
+++ b/docs/docsite/rst/dev_guide/developing_modules.rst
@@ -543,7 +543,7 @@ If you are using Ansible with the :envvar:`ANSIBLE_KEEP_REMOTE_FILES`
environment variables to keep the remote module file, here's a sample of how
your debugging session will start:
-.. code-block:: sh
+.. code-block:: shell-session
$ ANSIBLE_KEEP_REMOTE_FILES=1 ansible localhost -m ping -a 'data=debugging_session' -vvv
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: badger
diff --git a/docs/docsite/rst/dev_guide/developing_test_pr.rst b/docs/docsite/rst/dev_guide/developing_test_pr.rst
index 72d85a6860..361f56402b 100644
--- a/docs/docsite/rst/dev_guide/developing_test_pr.rst
+++ b/docs/docsite/rst/dev_guide/developing_test_pr.rst
@@ -180,9 +180,11 @@ If the PR does not resolve the issue, or if you see any failures from the unit/i
|
| When I ran this Ubuntu 16.04 it failed with the following:
|
+ | ```
| BLARG
| StrackTrace
| RRRARRGGG
+ | ```
When you are done testing a feature branch, you can remove it with the following command:
diff --git a/docs/docsite/rst/playbooks_filters.rst b/docs/docsite/rst/playbooks_filters.rst
index a925aafb5a..b59838813d 100644
--- a/docs/docsite/rst/playbooks_filters.rst
+++ b/docs/docsite/rst/playbooks_filters.rst
@@ -455,6 +455,8 @@ That will create the following output:
.. code-block:: sh
+.. code-block:: sh
+
#######
#
# Custom style
diff --git a/hacking/templates/rst.j2 b/hacking/templates/rst.j2
index f6cc9d279d..e5932a1528 100644
--- a/hacking/templates/rst.j2
+++ b/hacking/templates/rst.j2
@@ -200,5 +200,5 @@ For more information on what this means please read :doc:`modules_extra`
{% endif %}
{% endif %}
-For help in developing on modules, should you be so inclined, please read :doc:`community`, :doc:`dev_guide/developing_test_pr` and :doc:`developing_modules`.
+For help in developing on modules, should you be so inclined, please read :doc:`community`, :doc:`dev_guide/developing_test_pr` and :doc:`dev_guide/developing_modules`.
diff --git a/lib/ansible/modules/cloud/amazon/cloudformation_facts.py b/lib/ansible/modules/cloud/amazon/cloudformation_facts.py
index ae40ed0242..45b53bcc5a 100644
--- a/lib/ansible/modules/cloud/amazon/cloudformation_facts.py
+++ b/lib/ansible/modules/cloud/amazon/cloudformation_facts.py
@@ -87,22 +87,22 @@ EXAMPLES = '''
stack_policy: true
# Example dictionary outputs for stack_outputs, stack_parameters and stack_resources:
-"stack_outputs": {
- "ApplicationDatabaseName": "dazvlpr01xj55a.ap-southeast-2.rds.amazonaws.com",
- ...
-},
-"stack_parameters": {
- "DatabaseEngine": "mysql",
- "DatabasePassword": "****",
- ...
-},
-"stack_resources": {
- "AutoscalingGroup": "dev-someapp-AutoscalingGroup-1SKEXXBCAN0S7",
- "AutoscalingSecurityGroup": "sg-abcd1234",
- "ApplicationDatabase": "dazvlpr01xj55a",
- "EcsTaskDefinition": "arn:aws:ecs:ap-southeast-2:123456789:task-definition/dev-someapp-EcsTaskDefinition-1F2VM9QB0I7K9:1"
- ...
-}
+# "stack_outputs": {
+# "ApplicationDatabaseName": "dazvlpr01xj55a.ap-southeast-2.rds.amazonaws.com",
+# ...
+# },
+# "stack_parameters": {
+# "DatabaseEngine": "mysql",
+# "DatabasePassword": "****",
+# ...
+# },
+# "stack_resources": {
+# "AutoscalingGroup": "dev-someapp-AutoscalingGroup-1SKEXXBCAN0S7",
+# "AutoscalingSecurityGroup": "sg-abcd1234",
+# "ApplicationDatabase": "dazvlpr01xj55a",
+# "EcsTaskDefinition": "arn:aws:ecs:ap-southeast-2:123456789:task-definition/dev-someapp-EcsTaskDefinition-1F2VM9QB0I7K9:1"
+# ...
+# }
'''
RETURN = '''
diff --git a/lib/ansible/modules/cloud/misc/xenserver_facts.py b/lib/ansible/modules/cloud/misc/xenserver_facts.py
index 75f0268b8f..24b66f05e4 100644
--- a/lib/ansible/modules/cloud/misc/xenserver_facts.py
+++ b/lib/ansible/modules/cloud/misc/xenserver_facts.py
@@ -50,12 +50,14 @@ EXAMPLES = '''
with_items: "{{ xs_vms.keys() }}"
when: xs_vms[item]['power_state'] == "Running"
-TASK: [Print running VMs] ***********************************************************
-skipping: [10.13.0.22] => (item=CentOS 4.7 (32-bit))
-ok: [10.13.0.22] => (item=Control domain on host: 10.0.13.22) => {
- "item": "Control domain on host: 10.0.13.22",
- "msg": "Control domain on host: 10.0.13.22"
-}
+# Which will print:
+#
+# TASK: [Print running VMs] ***********************************************************
+# skipping: [10.13.0.22] => (item=CentOS 4.7 (32-bit))
+# ok: [10.13.0.22] => (item=Control domain on host: 10.0.13.22) => {
+# "item": "Control domain on host: 10.0.13.22",
+# "msg": "Control domain on host: 10.0.13.22"
+# }
'''
class XenServerFacts:
diff --git a/lib/ansible/modules/cloud/vmware/vsphere_guest.py b/lib/ansible/modules/cloud/vmware/vsphere_guest.py
index a309064fe4..e7de7625d4 100644
--- a/lib/ansible/modules/cloud/vmware/vsphere_guest.py
+++ b/lib/ansible/modules/cloud/vmware/vsphere_guest.py
@@ -291,7 +291,7 @@ EXAMPLES = '''
hw_guest_id: "rhel6_64Guest"
hw_memtotal_mb: 2048
hw_name: "centos64Guest"
- hw_power_status: "POWERED ON",
+ hw_power_status: "POWERED ON"
hw_processor_count: 2
hw_product_uuid: "ef50bac8-2845-40ff-81d9-675315501dac"
diff --git a/lib/ansible/modules/files/find.py b/lib/ansible/modules/files/find.py
index eee57e44fc..15f4d6eced 100644
--- a/lib/ansible/modules/files/find.py
+++ b/lib/ansible/modules/files/find.py
@@ -121,7 +121,7 @@ options:
'''
-EXAMPLES = '''
+EXAMPLES = r'''
# Recursively find /tmp files older than 2 days
- find:
paths: "/tmp"
@@ -149,9 +149,11 @@ EXAMPLES = '''
size: "10m"
# find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz via regex
+# Note that yaml double quotes require escaping backslashes but yaml single
+# quotes do not.
- find:
paths: "/var/tmp"
- patterns: "^.*?\.(?:old|log\.gz)$"
+ patterns: "^.*?\\.(?:old|log\\.gz)$"
size: "10m"
use_regex: True
'''
diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py
index ba7f4a3cc1..28202aa4ac 100644
--- a/lib/ansible/modules/files/lineinfile.py
+++ b/lib/ansible/modules/files/lineinfile.py
@@ -160,15 +160,16 @@ EXAMPLES = r"""
line: '192.168.1.99 foo.lab.net foo'
# Fully quoted because of the ': ' on the line. See the Gotchas in the YAML docs.
-- lineinfile: "
+- lineinfile:
dest: /etc/sudoers
state: present
- regexp: '^%wheel'
+ regexp: '^%wheel\s'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
+# Yaml requires escaping backslashes in double quotes but not in single quotes
- lineinfile:
dest: /opt/jboss-as/bin/standalone.conf
- regexp: '^(.*)Xms(\d+)m(.*)$'
+ regexp: "^(.*)Xms(\\d+)m(.*)$"
line: '\1Xms${xms}m\3'
backrefs: yes
diff --git a/lib/ansible/modules/messaging/rabbitmq_binding.py b/lib/ansible/modules/messaging/rabbitmq_binding.py
index 428bec096f..446d7d8536 100644
--- a/lib/ansible/modules/messaging/rabbitmq_binding.py
+++ b/lib/ansible/modules/messaging/rabbitmq_binding.py
@@ -109,7 +109,7 @@ EXAMPLES = '''
name: topicExchange
destination: topicExchange
type: exchange
- routing_key: *.info
+ routing_key: '*.info'
'''
import requests
diff --git a/lib/ansible/modules/network/basics/slurp.py b/lib/ansible/modules/network/basics/slurp.py
index f2ece413da..f4e00684e7 100644
--- a/lib/ansible/modules/network/basics/slurp.py
+++ b/lib/ansible/modules/network/basics/slurp.py
@@ -48,11 +48,24 @@ author:
'''
EXAMPLES = '''
-ansible host -m slurp -a 'src=/tmp/xx'
- host | success >> {
- "content": "aGVsbG8gQW5zaWJsZSB3b3JsZAo=",
- "encoding": "base64"
- }
+# Find out what the remote machine's mounts are:
+- slurp:
+ src: /proc/mounts
+ register: mounts
+
+- debug:
+ msg: "{{ mounts['content'] | b64decode }}"
+
+# From the commandline, find the pid of the remote machine's sshd
+# $ ansible host -m slurp -a 'src=/var/run/sshd.pid'
+# host | SUCCESS => {
+# "changed": false,
+# "content": "MjE3OQo=",
+# "encoding": "base64",
+# "source": "/var/run/sshd.pid"
+# }
+# $ echo MjE3OQo= | base64 -d
+# 2179
'''
import base64
diff --git a/lib/ansible/modules/network/nmcli.py b/lib/ansible/modules/network/nmcli.py
index 3571c9a77d..7e43c8ecc0 100644
--- a/lib/ansible/modules/network/nmcli.py
+++ b/lib/ansible/modules/network/nmcli.py
@@ -216,112 +216,113 @@ options:
'''
EXAMPLES='''
-The following examples are working examples that I have run in the field. I followed follow the structure:
-```
-|_/inventory/cloud-hosts
-| /group_vars/openstack-stage.yml
-| /host_vars/controller-01.openstack.host.com
-| /host_vars/controller-02.openstack.host.com
-|_/playbook/library/nmcli.py
-| /playbook-add.yml
-| /playbook-del.yml
-```
-
-## inventory examples
-### groups_vars
-```yml
----
-#devops_os_define_network
-storage_gw: "192.0.2.254"
-external_gw: "198.51.100.254"
-tenant_gw: "203.0.113.254"
-
-#Team vars
-nmcli_team:
- - conn_name: tenant
- ip4: '{{ tenant_ip }}'
- gw4: '{{ tenant_gw }}'
- - conn_name: external
- ip4: '{{ external_ip }}'
- gw4: '{{ external_gw }}'
- - conn_name: storage
- ip4: '{{ storage_ip }}'
- gw4: '{{ storage_gw }}'
-nmcli_team_slave:
- - conn_name: em1
- ifname: em1
- master: tenant
- - conn_name: em2
- ifname: em2
- master: tenant
- - conn_name: p2p1
- ifname: p2p1
- master: storage
- - conn_name: p2p2
- ifname: p2p2
- master: external
-
-#bond vars
-nmcli_bond:
- - conn_name: tenant
- ip4: '{{ tenant_ip }}'
- gw4: ''
- mode: balance-rr
- - conn_name: external
- ip4: '{{ external_ip }}'
- gw4: ''
- mode: balance-rr
- - conn_name: storage
- ip4: '{{ storage_ip }}'
- gw4: '{{ storage_gw }}'
- mode: balance-rr
-nmcli_bond_slave:
- - conn_name: em1
- ifname: em1
- master: tenant
- - conn_name: em2
- ifname: em2
- master: tenant
- - conn_name: p2p1
- ifname: p2p1
- master: storage
- - conn_name: p2p2
- ifname: p2p2
- master: external
-
-#ethernet vars
-nmcli_ethernet:
- - conn_name: em1
- ifname: em1
- ip4: '{{ tenant_ip }}'
- gw4: '{{ tenant_gw }}'
- - conn_name: em2
- ifname: em2
- ip4: '{{ tenant_ip1 }}'
- gw4: '{{ tenant_gw }}'
- - conn_name: p2p1
- ifname: p2p1
- ip4: '{{ storage_ip }}'
- gw4: '{{ storage_gw }}'
- - conn_name: p2p2
- ifname: p2p2
- ip4: '{{ external_ip }}'
- gw4: '{{ external_gw }}'
-```
-
-### host_vars
-```yml
----
-storage_ip: "192.0.2.91/23"
-external_ip: "198.51.100.23/21"
-tenant_ip: "203.0.113.77/23"
-```
+# These examples are using the following inventory:
+#
+# ## Directory layout:
+#
+# |_/inventory/cloud-hosts
+# | /group_vars/openstack-stage.yml
+# | /host_vars/controller-01.openstack.host.com
+# | /host_vars/controller-02.openstack.host.com
+# |_/playbook/library/nmcli.py
+# | /playbook-add.yml
+# | /playbook-del.yml
+# ```
+#
+# ## inventory examples
+# ### groups_vars
+# ```yml
+# ---
+# #devops_os_define_network
+# storage_gw: "192.0.2.254"
+# external_gw: "198.51.100.254"
+# tenant_gw: "203.0.113.254"
+#
+# #Team vars
+# nmcli_team:
+# - conn_name: tenant
+# ip4: '{{ tenant_ip }}'
+# gw4: '{{ tenant_gw }}'
+# - conn_name: external
+# ip4: '{{ external_ip }}'
+# gw4: '{{ external_gw }}'
+# - conn_name: storage
+# ip4: '{{ storage_ip }}'
+# gw4: '{{ storage_gw }}'
+# nmcli_team_slave:
+# - conn_name: em1
+# ifname: em1
+# master: tenant
+# - conn_name: em2
+# ifname: em2
+# master: tenant
+# - conn_name: p2p1
+# ifname: p2p1
+# master: storage
+# - conn_name: p2p2
+# ifname: p2p2
+# master: external
+#
+# #bond vars
+# nmcli_bond:
+# - conn_name: tenant
+# ip4: '{{ tenant_ip }}'
+# gw4: ''
+# mode: balance-rr
+# - conn_name: external
+# ip4: '{{ external_ip }}'
+# gw4: ''
+# mode: balance-rr
+# - conn_name: storage
+# ip4: '{{ storage_ip }}'
+# gw4: '{{ storage_gw }}'
+# mode: balance-rr
+# nmcli_bond_slave:
+# - conn_name: em1
+# ifname: em1
+# master: tenant
+# - conn_name: em2
+# ifname: em2
+# master: tenant
+# - conn_name: p2p1
+# ifname: p2p1
+# master: storage
+# - conn_name: p2p2
+# ifname: p2p2
+# master: external
+#
+# #ethernet vars
+# nmcli_ethernet:
+# - conn_name: em1
+# ifname: em1
+# ip4: '{{ tenant_ip }}'
+# gw4: '{{ tenant_gw }}'
+# - conn_name: em2
+# ifname: em2
+# ip4: '{{ tenant_ip1 }}'
+# gw4: '{{ tenant_gw }}'
+# - conn_name: p2p1
+# ifname: p2p1
+# ip4: '{{ storage_ip }}'
+# gw4: '{{ storage_gw }}'
+# - conn_name: p2p2
+# ifname: p2p2
+# ip4: '{{ external_ip }}'
+# gw4: '{{ external_gw }}'
+# ```
+#
+# ### host_vars
+# ```yml
+# ---
+# storage_ip: "192.0.2.91/23"
+# external_ip: "198.51.100.23/21"
+# tenant_ip: "203.0.113.77/23"
+# ```
## playbook-add.yml example
-```yml
---
- hosts: openstack-stage
remote_user: root
@@ -360,42 +361,40 @@ tenant_ip: "203.0.113.77/23"
- '{{ nmcli_team_slave }}'
###### Working with all cloud nodes - Bonding
-# - name: try nmcli add bond - conn_name only & ip4 gw4 mode
-# nmcli:
-# type: bond
-# conn_name: '{{ item.conn_name }}'
-# ip4: '{{ item.ip4 }}'
-# gw4: '{{ item.gw4 }}'
-# mode: '{{ item.mode }}'
-# state: present
-# with_items:
-# - '{{ nmcli_bond }}'
-#
-# - name: try nmcli add bond-slave
-# nmcli:
-# type: bond-slave
-# conn_name: '{{ item.conn_name }}'
-# ifname: '{{ item.ifname }}'
-# master: '{{ item.master }}'
-# state: present
-# with_items:
-# - '{{ nmcli_bond_slave }}'
+ - name: try nmcli add bond - conn_name only & ip4 gw4 mode
+ nmcli:
+ type: bond
+ conn_name: '{{ item.conn_name }}'
+ ip4: '{{ item.ip4 }}'
+ gw4: '{{ item.gw4 }}'
+ mode: '{{ item.mode }}'
+ state: present
+ with_items:
+ - '{{ nmcli_bond }}'
+
+ - name: try nmcli add bond-slave
+ nmcli:
+ type: bond-slave
+ conn_name: '{{ item.conn_name }}'
+ ifname: '{{ item.ifname }}'
+ master: '{{ item.master }}'
+ state: present
+ with_items:
+ - '{{ nmcli_bond_slave }}'
##### Working with all cloud nodes - Ethernet
-# - name: nmcli add Ethernet - conn_name only & ip4 gw4
-# nmcli:
-# type: ethernet
-# conn_name: '{{ item.conn_name }}'
-# ip4: '{{ item.ip4 }}'
-# gw4: '{{ item.gw4 }}'
-# state: present
-# with_items:
-# - '{{ nmcli_ethernet }}'
-```
+ - name: nmcli add Ethernet - conn_name only & ip4 gw4
+ nmcli:
+ type: ethernet
+ conn_name: '{{ item.conn_name }}'
+ ip4: '{{ item.ip4 }}'
+ gw4: '{{ item.gw4 }}'
+ state: present
+ with_items:
+ - '{{ nmcli_ethernet }}'
## playbook-del.yml example
-```yml
---
- hosts: openstack-stage
remote_user: root
@@ -421,7 +420,7 @@ tenant_ip: "203.0.113.77/23"
- conn_name: team-p1p2
- conn_name: team-p2p1
- conn_name: team-p2p2
-```
+
# To add an Ethernet connection with static IP configuration, issue a command as follows
- nmcli:
conn_name: my-eth1
@@ -464,7 +463,7 @@ tenant_ip: "203.0.113.77/23"
- nmcli:
ctype: ethernet
name: my-eth1
- ifname: *
+ ifname: '*'
state: present
# To change the property of a setting e.g. MTU, issue a command as follows:
@@ -474,20 +473,20 @@ tenant_ip: "203.0.113.77/23"
type: ethernet
state: present
- Exit Status's:
- - nmcli exits with status 0 if it succeeds, a value greater than 0 is
- returned if an error occurs.
- - 0 Success - indicates the operation succeeded
- - 1 Unknown or unspecified error
- - 2 Invalid user input, wrong nmcli invocation
- - 3 Timeout expired (see --wait option)
- - 4 Connection activation failed
- - 5 Connection deactivation failed
- - 6 Disconnecting device failed
- - 7 Connection deletion failed
- - 8 NetworkManager is not running
- - 9 nmcli and NetworkManager versions mismatch
- - 10 Connection, device, or access point does not exist.
+# Exit Status's:
+# - nmcli exits with status 0 if it succeeds, a value greater than 0 is
+# returned if an error occurs.
+# - 0 Success - indicates the operation succeeded
+# - 1 Unknown or unspecified error
+# - 2 Invalid user input, wrong nmcli invocation
+# - 3 Timeout expired (see --wait option)
+# - 4 Connection activation failed
+# - 5 Connection deactivation failed
+# - 6 Disconnecting device failed
+# - 7 Connection deletion failed
+# - 8 NetworkManager is not running
+# - 9 nmcli and NetworkManager versions mismatch
+# - 10 Connection, device, or access point does not exist.
'''
# import ansible.module_utils.basic
import os
diff --git a/lib/ansible/modules/packaging/os/dnf.py b/lib/ansible/modules/packaging/os/dnf.py
index bf138974a1..c980deb11d 100644
--- a/lib/ansible/modules/packaging/os/dnf.py
+++ b/lib/ansible/modules/packaging/os/dnf.py
@@ -124,7 +124,7 @@ EXAMPLES = '''
- name: upgrade all packages
dnf:
- name: *
+ name: "*"
state: latest
- name: install the nginx rpm from a remote repo
diff --git a/lib/ansible/modules/packaging/os/openbsd_pkg.py b/lib/ansible/modules/packaging/os/openbsd_pkg.py
index 522492c391..24089e61de 100644
--- a/lib/ansible/modules/packaging/os/openbsd_pkg.py
+++ b/lib/ansible/modules/packaging/os/openbsd_pkg.py
@@ -126,7 +126,7 @@ EXAMPLES = '''
# Update all packages on the system
- openbsd_pkg:
- name: *
+ name: '*'
state: latest
# Purge a package and it's configuration files
diff --git a/lib/ansible/modules/packaging/os/portage.py b/lib/ansible/modules/packaging/os/portage.py
index af7c891a45..5e2b241c83 100644
--- a/lib/ansible/modules/packaging/os/portage.py
+++ b/lib/ansible/modules/packaging/os/portage.py
@@ -208,12 +208,12 @@ EXAMPLES = '''
# Re-install world from binary packages only and do not allow any compiling
- portage:
- package: @world
+ package: '@world'
usepkgonly: yes
# Sync repositories and update world
- portage:
- package: @world
+ package: '@world'
update: yes
deep: yes
sync: yes
diff --git a/lib/ansible/modules/packaging/os/zypper.py b/lib/ansible/modules/packaging/os/zypper.py
index 837a7ef477..a3fe2aa2b1 100644
--- a/lib/ansible/modules/packaging/os/zypper.py
+++ b/lib/ansible/modules/packaging/os/zypper.py
@@ -150,12 +150,12 @@ EXAMPLES = '''
# Update all packages
- zypper:
- name: *
+ name: '*'
state: latest
# Apply all available patches
- zypper:
- name: *
+ name: '*'
state: latest
type: patch
diff --git a/lib/ansible/modules/packaging/os/zypper_repository.py b/lib/ansible/modules/packaging/os/zypper_repository.py
index 187e580367..97ca36100b 100644
--- a/lib/ansible/modules/packaging/os/zypper_repository.py
+++ b/lib/ansible/modules/packaging/os/zypper_repository.py
@@ -135,7 +135,7 @@ EXAMPLES = '''
# Refresh all repos
- zypper_repository:
- repo: *
+ repo: '*'
runrefresh: yes
# Add a repo and add it's gpg key
diff --git a/lib/ansible/modules/system/pam_limits.py b/lib/ansible/modules/system/pam_limits.py
index f47fbf06bb..ab508c5727 100644
--- a/lib/ansible/modules/system/pam_limits.py
+++ b/lib/ansible/modules/system/pam_limits.py
@@ -110,7 +110,7 @@ EXAMPLES = '''
# Add or modify memlock, both soft and hard, limit for the user james with a comment.
- pam_limits:
domain: james
- limit_type: -
+ limit_type: '-'
limit_item: memlock
value: unlimited
comment: unlimited memory lock for james
diff --git a/lib/ansible/modules/windows/win_iis_website.py b/lib/ansible/modules/windows/win_iis_website.py
index 7f53363128..fd9fff4d85 100644
--- a/lib/ansible/modules/windows/win_iis_website.py
+++ b/lib/ansible/modules/windows/win_iis_website.py
@@ -99,34 +99,8 @@ author: Henrik Wallström
'''
EXAMPLES = '''
-# This return information about an existing host
-$ ansible -i vagrant-inventory -m win_iis_website -a "name='Default Web Site'" window
-host | success >> {
- "changed": false,
- "site": {
- "ApplicationPool": "DefaultAppPool",
- "Bindings": [
- "*:80:"
- ],
- "ID": 1,
- "Name": "Default Web Site",
- "PhysicalPath": "%SystemDrive%\\inetpub\\wwwroot",
- "State": "Stopped"
- }
-}
-
-# This stops an existing site.
-$ ansible -i hosts -m win_iis_website -a "name='Default Web Site' state=stopped" host
-
-# This creates a new site.
-$ ansible -i hosts -m win_iis_website -a "name=acme physical_path=c:\\sites\\acme" host
-
-# Change logfile .
-$ ansible -i hosts -m win_iis_website -a "name=acme physical_path=c:\\sites\\acme" host
-
-# Playbook example
----
+# Start a website
- name: Acme IIS site
win_iis_website:
@@ -140,4 +114,30 @@ $ ansible -i hosts -m win_iis_website -a "name=acme physical_path=c:\\sites\\acm
parameters: 'logfile.directory:c:\\sites\\logs'
register: website
+# Some commandline examples:
+
+# This return information about an existing host
+# $ ansible -i vagrant-inventory -m win_iis_website -a "name='Default Web Site'" window
+# host | success >> {
+# "changed": false,
+# "site": {
+# "ApplicationPool": "DefaultAppPool",
+# "Bindings": [
+# "*:80:"
+# ],
+# "ID": 1,
+# "Name": "Default Web Site",
+# "PhysicalPath": "%SystemDrive%\\inetpub\\wwwroot",
+# "State": "Stopped"
+# }
+# }
+
+# This stops an existing site.
+# $ ansible -i hosts -m win_iis_website -a "name='Default Web Site' state=stopped" host
+
+# This creates a new site.
+# $ ansible -i hosts -m win_iis_website -a "name=acme physical_path=c:\\sites\\acme" host
+
+# Change logfile.
+# $ ansible -i hosts -m win_iis_website -a "name=acme physical_path=c:\\sites\\acme" host
'''
diff --git a/lib/ansible/modules/windows/win_unzip.py b/lib/ansible/modules/windows/win_unzip.py
index 835029839c..994c28ea5e 100644
--- a/lib/ansible/modules/windows/win_unzip.py
+++ b/lib/ansible/modules/windows/win_unzip.py
@@ -71,16 +71,16 @@ author: Phil Schwartz
EXAMPLES = r'''
# This unzips a library that was downloaded with win_get_url, and removes the file after extraction
-$ ansible -i hosts -m win_unzip -a "src=C:\LibraryToUnzip.zip dest=C:\Lib rm=true" all
+# $ ansible -i hosts -m win_unzip -a "src=C:\\LibraryToUnzip.zip dest=C:\\Lib rm=true" all
# Playbook example
# Simple unzip
---
- name: Unzip a bz2 (BZip) file
win_unzip:
- src: "C:\Users\Phil\Logs.bz2"
- dest: "C:\Users\Phil\OldLogs"
- creates: "C:\Users\Phil\OldLogs"
+ src: C:\Users\Phil\Logs.bz2
+ dest: C:\Users\Phil\OldLogs
+ creates: C:\Users\Phil\OldLogs
# This playbook example unzips a .zip file and recursively decompresses the contained .gz files and removes all unneeded compressed files after completion.
---