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
05866bba
Commit
05866bba
authored
Oct 18, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1372 from jpmens/rst_template1
module_formatter: .rst now correctly handles code examples
parents
e59f5d60
57545946
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
7 deletions
+12
-7
hacking/templates/man.j2
+4
-0
hacking/templates/rst.j2
+5
-3
library/cron
+1
-1
library/debug
+1
-1
library/fireball
+1
-2
No files found.
hacking/templates/man.j2
View file @
05866bba
...
@@ -46,6 +46,10 @@
...
@@ -46,6 +46,10 @@
.SH EXAMPLES
.SH EXAMPLES
{% for e in examples %}
{% for e in examples %}
.PP
.PP
{% if e['description'] %}
@{ e['description'] | jpfunc }@
{% endif %}
.nf
.nf
@{ e['code'] }@
@{ e['code'] }@
.fi
.fi
...
...
hacking/templates/rst.j2
View file @
05866bba
...
@@ -45,9 +45,11 @@
...
@@ -45,9 +45,11 @@
{% for example in examples %}
{% for example in examples %}
{% if example['description'] %}<p>@{ example['description'] | html_ify }@</p>{% endif %}
{% if example['description'] %}<p>@{ example['description'] | html_ify }@</p>{% endif %}
<p><pre>
<p>
@{ example['code'] }@
<pre>
</pre></p>
@{ example['code'] | indent(4, True) }@
</pre>
</p>
{% endfor %}
{% endfor %}
<br/>
<br/>
...
...
library/cron
View file @
05866bba
...
@@ -101,7 +101,7 @@ options:
...
@@ -101,7 +101,7 @@ options:
examples:
examples:
- code: cron name="check dirs" hour="5,2" job="ls -alh > /dev/null"
- code: cron name="check dirs" hour="5,2" job="ls -alh > /dev/null"
description: Ensure a job that runs at 2 and 5 exists. Creates an entry like "* 5,2 * * ls -alh > /dev/null"
description: Ensure a job that runs at 2 and 5 exists. Creates an entry like "* 5,2 * * ls -alh > /dev/null"
- code: name="an old job" cron job="/some/dir/job.sh" state=absent
- code:
cron
name="an old job" cron job="/some/dir/job.sh" state=absent
description: 'Ensure an old job is no longer present. Removes any job that is preceded by "#Ansible: an old job" in the crontab'
description: 'Ensure an old job is no longer present. Removes any job that is preceded by "#Ansible: an old job" in the crontab'
requirements: cron
requirements: cron
author: Dane Summers
author: Dane Summers
...
...
library/debug
View file @
05866bba
...
@@ -48,7 +48,7 @@ options:
...
@@ -48,7 +48,7 @@ options:
required: false
required: false
default: "no"
default: "no"
examples:
examples:
- code:
- code:
|
- local_action: debug msg="System $inventory_hostname has uuid $ansible_product_uuid"
- local_action: debug msg="System $inventory_hostname has uuid $ansible_product_uuid"
- local_action: debug msg="System $inventory_hostname lacks a gateway" fail=yes
- local_action: debug msg="System $inventory_hostname lacks a gateway" fail=yes
only_if: "is_unset('${ansible_default_ipv4.gateway}')"
only_if: "is_unset('${ansible_default_ipv4.gateway}')"
...
...
library/fireball
View file @
05866bba
...
@@ -51,8 +51,7 @@ examples:
...
@@ -51,8 +51,7 @@ examples:
sudo: yes
sudo: yes
tasks:
tasks:
- action: fireball
- action: fireball
- hosts: devservers
- hosts: devservers
connection: fireball
connection: fireball
tasks:
tasks:
- action: command /usr/bin/anything
- action: command /usr/bin/anything
...
...
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