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
fee20142
Commit
fee20142
authored
Mar 25, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RHN module YAML docs formatting
parent
861bee3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
library/rhn_channel
+19
-20
No files found.
library/rhn_channel
View file @
fee20142
...
...
@@ -3,45 +3,42 @@
DOCUMENTATION
=
'''
---
module: rhn_channel
short_description:
Define
Red Hat software channels
short_description:
Adds or removes
Red Hat software channels
description:
- Adds or removes Red Hat software channels
on a system
- Adds or removes Red Hat software channels
version_added: '1.1'
author: Vincent Van der Kussen
notes:
- this module fetches the systemid from rhn. A function
to use the local systemid is provided (get_localsystem)
but not integrated
- this module fetches the system id from RHN.
requirements:
- none
options:
name:
description
description
:
- name of the software channel
required: true
default: null
sysname:
description:
- name of the system as it is known in
rhn/satte
lite
- name of the system as it is known in
RHN/Satel
lite
required: true
default: null
url:
description:
- The full url to the
rhn/satte
lite api
- The full url to the
RHN/Satel
lite api
required: true
user:
description:
-
the user to login to rhn/sattelite
-
RHN/Satellite user
required: true
password:
description:
-
the user's password
-
"the user's password"
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
description: add software channel rhel-x86_64-server-v2vwin-6
to server01 in Red Hat Network
'''
EXAMPLES
=
'''
rhn_channel: name=rhel-x86_64-server-v2vwin-6 sysname=server01 url=https://rhn.redhat.com/rpc/api user=rhnuser password=guessme
'''
import
xmlrpclib
...
...
@@ -61,11 +58,13 @@ def get_systemid(client, session, sysname):
# ------------------------------------------------------- #
def
get_localsystemid
():
f
=
open
(
"/etc/sysconfig/rhn/systemid"
,
"r"
)
content
=
f
.
read
()
loc_id
=
re
.
search
(
r'\b(ID-)(\d{10})'
,
content
)
return
loc_id
.
group
(
2
)
# unused:
#
#def get_localsystemid():
# f = open("/etc/sysconfig/rhn/systemid", "r")
# content = f.read()
# loc_id = re.search(r'\b(ID-)(\d{10})' ,content)
# return loc_id.group(2)
# ------------------------------------------------------- #
...
...
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