1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

rhn+register: do not pass username/passwd for registration if none is specified. (#24244)

This commit is contained in:
Ritesh Khadgaray 2017-05-03 12:12:16 -04:00 committed by Adrian Likins
parent 4278618746
commit fb6e9e8fbe

View file

@ -254,7 +254,9 @@ class Rhn(redhat.RegistrationBase):
Register system to RHN. If enable_eus=True, extended update
support will be requested.
'''
register_cmd = ['/usr/sbin/rhnreg_ks', '--username', self.username, '--password', self.password, '--force']
register_cmd = ['/usr/sbin/rhnreg_ks', '--force']
if self.username:
register_cmd.extend(['--username', self.username, '--password', self.password])
if self.server_url:
register_cmd.extend(['--serverUrl', self.server_url])
if enable_eus: