ó oBú]c@s\dZddlmZddgZdgZdZd„Zed d d d„Zd „Z d S( s² Spacewalk --------- **Summary:** install and configure spacewalk This module installs spacewalk and applies basic configuration. If the ``spacewalk`` config key is present spacewalk will be installed. The server to connect to after installation must be provided in the ``server`` in spacewalk configuration. A proxy to connect through and a activation key may optionally be specified. For more information about spacewalk see: https://fedorahosted.org/spacewalk/ **Internal name:** ``cc_spacewalk`` **Module frequency:** per instance **Supported distros:** redhat, fedora **Config keys**:: spacewalk: server: proxy: activation_key: iÿÿÿÿ(tutiltredhattfedoras rhn-setups'/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERTcCs[t}y#tjddgdtƒt}Wn+tjk rV}|jdkrW‚qWnX|S(Nsrhn-profile-syncs --verbosetcapturei(tFalseRtsubptTruetProcessExecutionErrort exit_code(talready_registeredte((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pyt is_registered&s  cCsØ|dk r"|jd||ƒndg}|jdd|gƒ|jdt|ƒgƒ|r}|jdt|ƒgƒn|rŸ|jdt|ƒgƒn|rÁ|jdt|ƒgƒntj|d tƒdS( Ns;Registering using `rhnreg_ks` profile '%s' into server '%s't rhnreg_kss --serverUrlshttps://%s/XMLRPCs --profilenames--proxys --sslCACerts--activationkeyR(tNonetinfotextendtstrRRR(tservert profile_namet ca_cert_pathtproxytlogtactivation_keytcmd((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pyt do_register4s    c Cs²d|kr |jd|ƒdS|d}|jdƒ}|rž|jjtƒtƒs®t||jjdt ƒd|jdƒd|d|jdƒƒq®n|jd|ƒdS( Nt spacewalks=Skipping module named %s, no 'spacewalk' key in configurationRtfqdnRRRsOSkipping module named %s, 'spacewalk/server' key was not found in configuration( tdebugtgettdistrotinstall_packagestrequired_packagesR Rt datasourcet get_hostnameR(tnametcfgtcloudRt_argstspacewalk_server((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pythandleGs     N( t__doc__t cloudinitRtdistrosRtdef_ca_cert_pathR R RR'(((sA/usr/lib/python2.7/site-packages/cloudinit/config/cc_spacewalk.pyts