| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python2.7/site-packages/cloudinit/config/ |
Upload File : |
�
oB�]c @ s� d Z d d l m Z d d l m Z e j e � Z d d g Z d � Z d e
f d � � YZ d e f d
� � YZ
e d � Z d S(
s"
RedHat Subscription
-------------------
**Summary:** register red hat enterprise linux based system
Register a RedHat system either by username and password *or* activation and
org. Following a sucessful registration, you can auto-attach subscriptions, set
the service level, add subscriptions based on pool id, enable/disable yum
repositories based on repo id, and alter the rhsm_baseurl and server-hostname
in ``/etc/rhsm/rhs.conf``. For more details, see the ``Register RedHat
Subscription`` example config.
**Internal name:** ``cc_rh_subscription``
**Module frequency:** per instance
**Supported distros:** rhel, fedora
**Config keys**::
rh_subscription:
username: <username>
password: <password>
activation-key: <activation key>
org: <org number>
auto-attach: <true/false>
service-level: <service level>
add-pool: <list of pool ids>
enable-repo: <list of yum repo ids>
disable-repo: <list of yum repo ids>
rhsm-baseurl: <url>
server-hostname: <hostname>
i����( t log( t utilt fedorat rhelc C s� t | d | �} | j � s2 | j d | � d S| j � s�yi| j � \ } } | t k rn t | � � n | j � } | s� t d � � n | j r� | j
d k r� | j � s� t d � � q| j j d � n7 | j r| j
� s� t d � � q| j j d � n | j d k rxt | j t � sBd } t | � � n | j | j � }
|
sxt d j | j � � � qxn | j � }
|
s�t d
� � n | j d � Wq�t k
r�} | j t | � � | j d � q�Xn
| j d
� d S( NR s %s: module not configured.s- Registration failed or did not run completelys Setting of service-level faileds( Completed auto-attach with service levels Setting auto-attach faileds Completed auto-attachs"