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@sqdZddlZddlmZddlmZddlmZddlm Z eZ dZ dZ d Z dS( s  Rightscale Userdata ------------------- **Summary:** support rightscale configuration hooks This module adds support for RightScale configuration hooks to cloud-init. RightScale adds a entry in the format ``CLOUD_INIT_REMOTE_HOOK=http://...`` to ec2 user-data. This module checks for this line in the raw userdata and retrieves any scripts linked by the RightScale user data and places them in the user scripts configuration directory, to be run later by ``cc_scripts_user``. .. note:: the ``CLOUD_INIT_REMOTE_HOOK`` config variable is present in the raw ec2 user data only, not in any cloud-config parts **Internal name:** ``cc_rightscale_userdata`` **Module frequency:** per instance **Supported distros:** all **Config keys**:: CLOUD_INIT_REMOTE_HOOK= iN(t PER_INSTANCE(t url_helper(tutil(tparse_qstcc_rightscale_userdatatCLOUD_INIT_REMOTE_HOOKcCs y|j}Wn"tk r4|jd|dSXy:t|}| sWt|krn|jd|tdSWn'tk rtj|d|nXg}g}|jd} |t} xt| D]\} } t j j | d| } yNt j | }|jr=|jr=tj| |dd|j| nWqtk ry}|j|tj|dt| | qXqW|r|jd t|nt|t| krt| t|}|jd |n|r|jd t||d ndS( Ns'Failed to get raw userdata in module %ss:Skipping module %s, did not find %s in parsed raw userdatas1Failed to parse query string %s into a dictionarytscriptssrightscale-%02itmodeis!%s failed to read %s and write %ss)Wrote out rightscale userdata to %s filess%s urls were skipped or faileds2%s failed with exceptions, re-raising the last onei(tget_userdata_rawt ExceptiontdebugRt MY_HOOKNAMERtlogexct get_ipath_curt enumeratetostpathtjointuhelptreadurltoktcontentst write_filetappendtMY_NAMEtlentwarning(tnamet_cfgtcloudtlogt_argstudtmdictt wrote_fnstcaptured_excpst scripts_dturlstiturltfnametresptetskipped((sK/usr/lib/python2.7/site-packages/cloudinit/config/cc_rightscale_userdata.pythandleBsN          (t__doc__Rtcloudinit.settingsRt cloudinitRRRtsix.moves.urllib_parseRt frequencyRR R,(((sK/usr/lib/python2.7/site-packages/cloudinit/config/cc_rightscale_userdata.pyt!s