Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
479c4a4b
Commit
479c4a4b
authored
Aug 04, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enabled yaml highlighting globally, made specific emphasis for blocks in playbooks_blocks docs
parent
83ca5fb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
docsite/conf.py
+3
-1
docsite/rst/playbooks_blocks.rst
+9
-3
No files found.
docsite/conf.py
View file @
479c4a4b
...
...
@@ -55,7 +55,7 @@ master_doc = 'index'
# General substitutions.
project
=
'Ansible Documentation'
copyright
=
"2013 Ansible, Inc"
copyright
=
"2013
-2015
Ansible, Inc"
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
...
...
@@ -100,6 +100,8 @@ exclude_patterns = ['modules']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style
=
'sphinx'
highlight_language
=
'YAML'
# Options for HTML output
# -----------------------
...
...
docsite/rst/playbooks_blocks.rst
View file @
479c4a4b
...
...
@@ -7,11 +7,12 @@ at the block level, which also makes it much easier to set data or directives co
to the tasks.
Example::
.. code-block:: YAML
:emphasize-lines: 2
:caption: Block example
tasks:
- block:
- yum: name={{ item }} state=installed
with_items:
- httpd
...
...
@@ -25,6 +26,7 @@ Example::
become: true
become_user: root
In the example above the 3 tasks will be executed only when the block's when condition is met and enables
privilege escalation for all the enclosed tasks.
...
...
@@ -35,7 +37,11 @@ Error Handling
``````````````
About Blocks
Blocks also introduce the ability to handle errors in a way similar to exceptions in most programming languages.::
Blocks also introduce the ability to handle errors in a way similar to exceptions in most programming languages.
.. code-block:: YAML
:emphasize-lines: 2,6,10
:caption: Block error handling example
tasks:
- block:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment