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
508e6ecf
Commit
508e6ecf
authored
12 years ago
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1131 from jpmens/m-docs3
Module DOCUMENTATION for template, wait_for, and yum
parents
25a460fe
a040807f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
1 deletions
+121
-1
hacking/templates/man.j2
+1
-1
library/template
+41
-0
library/wait_for
+45
-0
library/yum
+34
-0
No files found.
hacking/templates/man.j2
View file @
508e6ecf
...
...
@@ -30,7 +30,7 @@
."
."
." ------ NOTES
{% if notes
is defined
-%}
{% if notes -%}
.SH NOTES
{% for note in notes -%}
.PP
...
...
This diff is collapsed.
Click to expand it.
library/template
View file @
508e6ecf
# this is a virtual module that is entirely implemented server side
DOCUMENTATION = '''
---
module: template
short_description: Templates a file out to a remote server.
description:
- Templates are processed by the Jinja2 templating language
(U(http://jinja.pocoo.org/docs/)) - documentation on the template
formatting can be found in the Template Designer Documentation
(U(http://jinja.pocoo.org/docs/templates/)).
options:
src:
description:
- Path of a Jinja2 formatted template on the local server. This can be a relative or absolute path.
required: true
default: null
aliases: []
dest:
description:
- Location to render the template to on the remote machine.
required: true
default: null
backup:
description:
- Create a backup file including the timestamp information so you can get
the original file back if you somehow clobbered it incorrectly.
required: false
choices: [ "yes", "no" ]
default: "no"
others:
description:
- all arguments accepted by the M(file) module also work here
required: false
examples:
- code: template src=/mytemplates/foo.j2 dest=/etc/file.conf owner=bin group=wheel mode=0644
description: "Example from Ansible Playbooks"
notes: []
requirements: null
author: Michael DeHaan
'''
This diff is collapsed.
Click to expand it.
library/wait_for
View file @
508e6ecf
...
...
@@ -23,6 +23,51 @@ import datetime
import
time
import
sys
DOCUMENTATION
=
'''
---
module: wait_for
short_description: Waits for a given port to become accessible on a server.
description:
- This is useful for when services are not immediately available after
their init scripts return - which is true of certain Java application
servers. It is also useful when starting guests with the M(virt) module and
needing to pause until they are ready.
version_added: "0.7"
options:
host:
description:
- hostname or IP address to wait for
required: false
default: "127.0.0.1"
aliases: []
timeout:
description:
- maximum number of seconds to wait for
required: false
default: 300
delay:
description:
- number of seconds to wait before starting to poll
required: false
default: 0
port:
description:
- port number to poll
required: true
state:
description:
- either C(started), or C(stopped) depending on whether the module should
poll for the port being open or closed.
choices: [ "started", "stopped" ]
default: "started"
examples:
- code: wait_for port=8000 delay=10
description: "Example from Ansible Playbooks"
notes: []
requirements: null
author: Jeroen Hoekx
'''
def
main
():
module
=
AnsibleModule
(
...
...
This diff is collapsed.
Click to expand it.
library/yum
View file @
508e6ecf
...
...
@@ -25,6 +25,40 @@ import traceback
import
os
import
yum
DOCUMENTATION
=
'''
---
module: yum
short_description: Manages packages with the I(yum) package manager
description:
- Will install, upgrade, remove, and list packages with the I(yum) package manager.
options:
name:
description:
- package name, or package specifier with version, like C(name-1.0).
required: true
default: null
aliases: []
list:
description:
- various non-idempotent commands for usage with C(/usr/bin/ansible) and I(not) playbooks. See examples.
required: false
default: null
state:
description:
- whether to install (C(present), C(latest)), or remove (C(absent)) a package.
required: false
choices: [ "present", "latest", "absent" ]
default: "present"
examples:
- code: yum name=httpd state=latest
- code: yum name=httpd state=removed
- code: yum name=httpd state=installed
notes: []
# informational: requirements for nodes
requirements: [ yum, rpm ]
author: Seth Vidal
'''
def_qf
=
"
%
{name}-
%
{version}-
%
{release}.
%
{arch}"
repoquery
=
'/usr/bin/repoquery'
...
...
This diff is collapsed.
Click to expand it.
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