ó oBú]c@sqdZddlmZddlmZddlmZddlmZeZdddd d d gZd „Z d S(sŰ Phone Home ---------- **Summary:** post data to url This module can be used to post data to a remote host after boot is complete. If the post url contains the string ``$INSTANCE_ID`` it will be replaced with the id of the current instance. Either all data can be posted or a list of keys to post. Available keys are: - ``pub_key_dsa`` - ``pub_key_rsa`` - ``pub_key_ecdsa`` - ``instance_id`` - ``hostname`` - ``fdqn`` **Internal name:** ``cc_phone_home`` **Module frequency:** per instance **Supported distros:** all **Config keys**:: phone_home: url: http://example.com/$INSTANCE_ID/ post: - pub_key_dsa - instance_id - fqdn tries: 10 i˙˙˙˙(t templater(t url_helper(tutil(t PER_INSTANCEt pub_key_dsat pub_key_rsat pub_key_ecdsat instance_idthostnametfqdnc CsÁt|ƒdkr(tj|dƒ}n*d|krH|jd|ƒdS|d}d|krr|jd|ƒdS|d}|jddƒ}|jdƒ}yt|ƒ}Wn*tk rŮd }tj|d |ƒnX|dkrďt }ni} |j ƒ| d <|j ƒ| d <|j d t ƒ| d )s