Module DOCUMENTATION for template, wait_for, and yum
This commit is contained in:
parent
550fa7ec27
commit
d6625a2b1f
3 changed files with 120 additions and 0 deletions
41
template
41
template
|
@ -1 +1,42 @@
|
|||
# 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
|
||||
'''
|
||||
|
|
45
wait_for
45
wait_for
|
@ -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(
|
||||
|
|
34
yum
34
yum
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue