Hi list
I am trying to register my RHEL5 hosts to RHN. Here is an example what I do:
ansible HostA -kK -u admin -m rhn_register -a “state=present username=YYYY password=XXXX”
And the output:
HostA | FAILED => failed to parse:
Traceback (most recent call last):
File “/home/admin/.ansible/tmp/ansible-1371109421.04-39163328736735/rhn_register”, line 1264, in ?
main()
File “/home/admin/.ansible/tmp/ansible-1371109421.04-39163328736735/rhn_register”, line 349, in main
rhn.register(module.params[‘enable_eus’] == True, activationkey)
File “/home/admin/.ansible/tmp/ansible-1371109421.04-39163328736735/rhn_register”, line 263, in register
run_command(register_cmd)
File “/home/admin/.ansible/tmp/ansible-1371109421.04-39163328736735/rhn_register”, line 101, in run_command
stderr=subprocess.STDOUT)
File “/usr/lib64/python2.4/subprocess.py”, line 550, in init
errread, errwrite)
File “/usr/lib64/python2.4/subprocess.py”, line 996, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I have all required packages on remote host:
[root@HostA ~]# rpm -qa | grep rhn-setup
rhn-setup-0.4.20-86.el5
[root@HostA ~]# which rhnreg_ks
/usr/sbin/rhnreg_ks
[root@HostA ~]# uname -a
Linux HostA 2.6.18-348.6.1.el5 #1 SMP Fri Apr 26 09:21:26 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@HostA ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.9 (Tikanga)
ansible --version
ansible 1.3
I guess folks who writemodules must be informed that RHEL5 requires full path to any binary, otherwise it cannot find it, for some reason.
Thanks
Edgars