PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  oB]c@s|dZddlmZddlZddlmZmZddlmZ ddl m Z ddlm Z dZ d gZi d d 6d d 6dd6edd6ed6ede ededgd6e d6dd6iidd6iidd6idd6d6d6idd6de d6d6d 6dgd!6ed"6d#6d 6ZeeZe jeZddd$Zd%Zd&ZdS('s=ubuntu_advantage: Configure Ubuntu Advantage support servicesi(tdedentN(tget_schema_doctvalidate_cloudconfig_schema(tlog(t PER_INSTANCE(tutilshttps://ubuntu.com/advantagetubuntutcc_ubuntu_advantagetidsUbuntu Advantagetnames+Configure Ubuntu Advantage support servicesttitles Attach machine to an existing Ubuntu Advantage support contract and enable or disable support services such as Livepatch, ESM, FIPS and FIPS Updates. When attaching a machine to Ubuntu Advantage, one can also specify services to enable. When the 'enable' list is present, any named service will be enabled and all absent services will remain disabled. Note that when enabling FIPS or FIPS updates you will need to schedule a reboot to ensure the machine is running the FIPS-compliant kernel. See :ref:`Power State Change` for information on how to configure cloud-init to perform this reboot. t descriptiontdistross # Attach the machine to an Ubuntu Advantage support contract with a # UA contract token obtained from %s. ubuntu_advantage: token: s # Attach the machine to an Ubuntu Advantage support contract enabling # only fips and esm services. Services will only be enabled if # the environment supports said service. Otherwise warnings will # be logged for incompatible services specified. ubuntu-advantage: token: enable: - fips - esm s= # Attach the machine to an Ubuntu Advantage support contract and enable # the FIPS service. Perform a reboot once cloud-init has # completed. power_state: mode: reboot ubuntu-advantage: token: enable: - fips texamplest frequencytobjectttypetarraytstringtitemstenables"A contract token obtained from %s.ttokent propertiestrequiredtadditionalPropertiestubuntu_advantagec Csd}|s.d}tj|t|n|dkrCg}n\t|tjrntjd|g}n1t|tstjdt |j g}ndd|g}tj ddj |yt j|WnJt jk r$}djd t|}t jt|t|nXg}x`|D]X}y&dd |g}t j|d tWq2t jk r}|j||fq2Xq2W|rxB|D]:\}}d jd |d t|}t jt|qWtdjdj d|DndS(s8Call ua commandline client to attach or enable services.s(ubuntu_advantage: token must be providedsTubuntu_advantage: enable should be a list, not a string; treating as a single enablesOubuntu_advantage: enable should be a list, not a %s; skipping enabling servicestuatattachs!Attaching to Ubuntu Advantage. %st s+Failure attaching Ubuntu Advantage: {error}terrorRtcaptures%Failure enabling "{service}": {error}tservices0Failure enabling Ubuntu Advantage service(s): {}s, css$|]\}}dj|VqdS(s"{}"N(tformat(t.0Rt_((sH/usr/lib/python2.7/site-packages/cloudinit/config/cc_ubuntu_advantage.pys sN(tNonetLOGRt RuntimeErrort isinstancetsixt string_typestwarningtlistRt__name__tdebugtjoinRtsubptProcessExecutionErrorR tstrtlogexctTruetappend( RRRt attach_cmdtetmsgt enable_errorsRtcmd((sH/usr/lib/python2.7/site-packages/cloudinit/config/cc_ubuntu_advantage.pyt configure_ua[sN           cCstjdrdSy|jjWn$tk rJtjtdnXy|jjdgWn$tk rtjtdnXdS(s.Install ubuntu-advantage-tools if not present.RNsPackage update failedsubuntu-advantage-toolss(Failed to install ubuntu-advantage-tools(Rtwhichtdistrotupdate_package_sourcest ExceptionR1R$tinstall_packages(tcloud((sH/usr/lib/python2.7/site-packages/cloudinit/config/cc_ubuntu_advantage.pytmaybe_install_ua_toolss  cCsd}d|kr,tjd|d}nd|krE|d}n|dkretjd|dSt|td|krd}tj|t|nt|t d|j dd|j ddS( Nsubuntu-advantagesDeprecated configuration key "ubuntu-advantage" provided. Expected underscore delimited "ubuntu_advantage"; will attempt to continue.RsCSkipping module named %s, no 'ubuntu_advantage' configuration foundtcommandssPDeprecated configuration "ubuntu-advantage: commands" provided. Expected "token"RR( R#R$R)R,RtschemaRR%R@R9tget(R tcfgR?Rtargst ua_sectionR6((sH/usr/lib/python2.7/site-packages/cloudinit/config/cc_ubuntu_advantage.pythandles$           (t__doc__ttextwrapRR'tcloudinit.config.schemaRRt cloudinitRtloggingtcloudinit.settingsRRtUA_URLR tFalseRBt getLoggerR+R$R#R9R@RG(((sH/usr/lib/python2.7/site-packages/cloudinit/config/cc_ubuntu_advantage.pytsL      /