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
c163f5af
Commit
c163f5af
authored
Mar 24, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor consistency tweak, pwd => password
parent
ecda87cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
library/rhn_channel
+5
-6
No files found.
library/rhn_channel
View file @
c163f5af
...
...
@@ -33,13 +33,13 @@ options:
description:
- the user to login to rhn/sattelite
required: true
p
w
d:
p
asswor
d:
description:
- 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 p
w
d=guessme
url=https://rhn.redhat.com/rpc/api user=rhnuser p
asswor
d=guessme
description: add software channel rhel-x86_64-server-v2vwin-6
to server01 in Red Hat Network
'''
...
...
@@ -100,7 +100,7 @@ def main():
sysname
=
dict
(
required
=
True
),
url
=
dict
(
required
=
True
),
user
=
dict
(
required
=
True
),
p
wd
=
dict
(
required
=
True
),
p
assword
=
dict
(
required
=
True
,
aliases
=
[
'pwd'
]
),
)
# supports_check_mode=True
)
...
...
@@ -110,11 +110,11 @@ def main():
systname
=
module
.
params
[
'sysname'
]
saturl
=
module
.
params
[
'url'
]
user
=
module
.
params
[
'user'
]
p
wd
=
module
.
params
[
'pw
d'
]
p
assword
=
module
.
params
[
'passwor
d'
]
#initialize connection
client
=
xmlrpclib
.
Server
(
saturl
,
verbose
=
0
)
session
=
client
.
auth
.
login
(
user
,
p
w
d
)
session
=
client
.
auth
.
login
(
user
,
p
asswor
d
)
# get systemid
sys_id
=
get_systemid
(
client
,
session
,
systname
)
...
...
@@ -126,7 +126,6 @@ def main():
if
state
==
'present'
:
if
channelname
in
chans
:
module
.
exit_json
(
changed
=
False
,
msg
=
"Channel
%
s already exists"
%
channelname
)
else
:
subscribe_channels
(
channelname
,
client
,
session
,
systname
,
sys_id
)
module
.
exit_json
(
changed
=
True
,
msg
=
"Channel
%
s added"
%
channelname
)
...
...
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