mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixup fetch doc formatting.
This commit is contained in:
parent
267b29cec7
commit
f9a14f0d70
3 changed files with 30 additions and 24 deletions
2
Makefile
2
Makefile
|
@ -177,7 +177,7 @@ deb: debian
|
||||||
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory
|
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory
|
||||||
|
|
||||||
modulepages:
|
modulepages:
|
||||||
PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man3/ --module-dir=library --template-dir=hacking/templates
|
PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man3/ --module-dir=library --template-dir=hacking/templates --verbose
|
||||||
|
|
||||||
# because this requires Sphinx it is not run as part of every build, those building the RPM and so on can ignore this
|
# because this requires Sphinx it is not run as part of every build, those building the RPM and so on can ignore this
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@ except ImportError:
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: quantum_floating_ip_associate
|
module: quantum_floating_ip_associate
|
||||||
short_description: Associate/Disassociate a particular floating ip with an instance
|
short_description: Associate or disassociate a particular floating ip with an instance
|
||||||
description:
|
description:
|
||||||
- Associates or disassociate's a specific floating ip with a particular instance
|
- Associates or disassociates a specific floating ip with a particular instance
|
||||||
options:
|
options:
|
||||||
login_username:
|
login_username:
|
||||||
description:
|
description:
|
||||||
|
@ -38,46 +38,47 @@ options:
|
||||||
default: admin
|
default: admin
|
||||||
login_password:
|
login_password:
|
||||||
description:
|
description:
|
||||||
- Password of login user
|
- password of login user
|
||||||
required: true
|
required: true
|
||||||
default: True
|
default: True
|
||||||
login_tenant_name:
|
login_tenant_name:
|
||||||
description:
|
description:
|
||||||
- The tenant name of the login user
|
- the tenant name of the login user
|
||||||
required: true
|
required: true
|
||||||
default: True
|
default: true
|
||||||
auth_url:
|
auth_url:
|
||||||
description:
|
description:
|
||||||
- The keystone url for authentication
|
- the keystone url for authentication
|
||||||
required: false
|
required: false
|
||||||
default: 'http://127.0.0.1:35357/v2.0/'
|
default: 'http://127.0.0.1:35357/v2.0/'
|
||||||
region_name:
|
region_name:
|
||||||
description:
|
description:
|
||||||
- Name of the region
|
- name of the region
|
||||||
required: false
|
required: false
|
||||||
default: None
|
default: None
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Indicate desired state of the resource
|
- indicates the desired state of the resource
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
default: present
|
default: present
|
||||||
instance_name:
|
instance_name:
|
||||||
description:
|
description:
|
||||||
- Name of the instance to which the public ip should be assigned
|
- name of the instance to which the public ip should be assigned
|
||||||
required: true
|
required: true
|
||||||
default: None
|
default: None
|
||||||
ip_address:
|
ip_address:
|
||||||
description:
|
description:
|
||||||
- Floating ip that should be assigned to the instance
|
- floating ip that should be assigned to the instance
|
||||||
required: true
|
required: true
|
||||||
default: None
|
default: None
|
||||||
examples:
|
|
||||||
- code: "quantum_floating_ip_associate: state=present login_username=admin login_password=admin login_tenant_name=admin
|
|
||||||
ip_address=1.1.1.1 instance_name=vm1"
|
|
||||||
description: "Associate a specific floating ip with an Instance"
|
|
||||||
requirements: ["quantumclient", "keystoneclient"]
|
requirements: ["quantumclient", "keystoneclient"]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
EXAMPLES = '''
|
||||||
|
# Associate a specific floating ip with an Instance
|
||||||
|
quantum_floating_ip_associate: state=present login_username=admin login_password=admin login_tenant_name=admin ip_address=1.1.1.1 instance_name=vm1
|
||||||
|
'''
|
||||||
|
|
||||||
def _get_ksclient(module, kwargs):
|
def _get_ksclient(module, kwargs):
|
||||||
try:
|
try:
|
||||||
kclient = ksclient.Client(username=kwargs.get('login_username'),
|
kclient = ksclient.Client(username=kwargs.get('login_username'),
|
||||||
|
|
|
@ -41,15 +41,20 @@ options:
|
||||||
the destination. If dest ends with '/', it will use the basename of the source
|
the destination. If dest ends with '/', it will use the basename of the source
|
||||||
file, similar to the copy module. Obvioiusly this is only handy if the filenames
|
file, similar to the copy module. Obvioiusly this is only handy if the filenames
|
||||||
are unqiue.
|
are unqiue.
|
||||||
examples:
|
|
||||||
- code: "fetch: src=/var/log/messages dest=/home/logtree"
|
|
||||||
description: "Example from Ansible Playbooks"
|
|
||||||
- code: "fetch: src=/tmp/somefile dest="/tmp/beefcake-{{ ansible_hostname }}" flat=yes"
|
|
||||||
description: "Copies a file from remote machine and stores it at the absolute path /tmp/beefcake-{{ ansible_hostname }}"
|
|
||||||
- code: "fetch: src=/tmp/uniquefile dest="/tmp/special/" flat=yes"
|
|
||||||
description: "Copies a file from remote machine and stores it at the absolute path /tmp/special"
|
|
||||||
- code: "fetch: src=/tmp/uniquefile dest="special/" flat=yes"
|
|
||||||
description: "Copies a file from remote machine and stores it in special/uniquefile relative to the playbook"
|
|
||||||
requirements: []
|
requirements: []
|
||||||
author: Michael DeHaan
|
author: Michael DeHaan
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
EXAMPLES = '''
|
||||||
|
# Store file into /tmp/fetched/host.example.com/tmp/somefile
|
||||||
|
fetch: src=/tmp/somefile dest=/tmp/fetched
|
||||||
|
|
||||||
|
# Specifying a path directly
|
||||||
|
fetch: src=/tmp/somefile dest=/tmp/prefix-{{ ansible_hostname }} flat=yes
|
||||||
|
|
||||||
|
# Specifying a destination path
|
||||||
|
fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes
|
||||||
|
|
||||||
|
# Storing in a path relative to the playbook
|
||||||
|
fetch: src=/tmp/uniquefile dest=special/prefix-{{ ansible_hostname }} flat=yes
|
||||||
|
'''
|
Loading…
Reference in a new issue