Fix RHN module YAML docs formatting

reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent cb650843e2
commit dc56507310

@ -3,45 +3,42 @@
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: rhn_channel module: rhn_channel
short_description: Define Red Hat software channels short_description: Adds or removes Red Hat software channels
description: description:
- Adds or removes Red Hat software channels on a system - Adds or removes Red Hat software channels
version_added: '1.1' version_added: '1.1'
author: Vincent Van der Kussen author: Vincent Van der Kussen
notes: notes:
- this module fetches the systemid from rhn. A function - this module fetches the system id from RHN.
to use the local systemid is provided (get_localsystem)
but not integrated
requirements: requirements:
- none - none
options: options:
name: name:
description description:
- name of the software channel - name of the software channel
required: true required: true
default: null default: null
sysname: sysname:
description: description:
- name of the system as it is known in rhn/sattelite - name of the system as it is known in RHN/Satellite
required: true required: true
default: null default: null
url: url:
description: description:
- The full url to the rhn/sattelite api - The full url to the RHN/Satellite api
required: true required: true
user: user:
description: description:
- the user to login to rhn/sattelite - RHN/Satellite user
required: true required: true
password: password:
description: description:
- the user's password - "the user's password"
required: true required: true
examples: '''
- code: rhn_channel name=rhel-x86_64-server-v2vwin-6 sysname=server01
url=https://rhn.redhat.com/rpc/api user=rhnuser password=guessme EXAMPLES = '''
description: add software channel rhel-x86_64-server-v2vwin-6 rhn_channel: name=rhel-x86_64-server-v2vwin-6 sysname=server01 url=https://rhn.redhat.com/rpc/api user=rhnuser password=guessme
to server01 in Red Hat Network
''' '''
import xmlrpclib import xmlrpclib
@ -61,11 +58,13 @@ def get_systemid(client, session, sysname):
# ------------------------------------------------------- # # ------------------------------------------------------- #
def get_localsystemid(): # unused:
f = open("/etc/sysconfig/rhn/systemid", "r") #
content = f.read() #def get_localsystemid():
loc_id = re.search(r'\b(ID-)(\d{10})' ,content) # f = open("/etc/sysconfig/rhn/systemid", "r")
return loc_id.group(2) # content = f.read()
# loc_id = re.search(r'\b(ID-)(\d{10})' ,content)
# return loc_id.group(2)
# ------------------------------------------------------- # # ------------------------------------------------------- #

Loading…
Cancel
Save