Current File : //lib/python2.7/site-packages/cloudinit/config/cc_runcmd.pyo
�
oB�]c@s8dZddlmZmZddlmZddlmZddlm	Z	ddl
Z
ddlmZegZ
i	dd	6d
d6dd
6ed�d6e
d6ed�gd6ed6dd6iidd6iidd6idd6d6idd6gd6d6ed6ed6dd6gd6d6d 6Zee�Zd!�ZdS("sERuncmd: run arbitrary commands at rc.local with output to the consolei����(tget_schema_doctvalidate_cloudconfig_schema(tALL_DISTROS(tPER_INSTANCE(tutilN(tdedentt	cc_runcmdtidtRuncmdtnamesRun arbitrary commandsttitles�        Run arbitrary commands at a rc.local like level with output to the
        console. Each item can be either a list or a string. If the item is a
        list, it will be properly executed as if passed to ``execve()`` (with
        the first arg as the command). If the item is a string, it will be
        written to a file and interpreted
        using ``sh``.

        .. note::

          all commands must be proper yaml, so you have to quote any characters
          yaml would eat (':' can be problematic)

        .. note::

          when writing files, do not use /tmp dir as it races with
          systemd-tmpfiles-clean LP: #1707222. Use /run/somedir instead.
    tdescriptiontdistross        runcmd:
            - [ ls, -l, / ]
            - [ sh, -xc, "echo $(date) ': hello world!'" ]
            - [ sh, -c, echo "=========hello world'=========" ]
            - ls -l /root
            - [ wget, "http://example.org", -O, /tmp/index.html ]
    texamplest	frequencytobjectttypetarraytstringtitemstoneOftadditionalItemstadditionalPropertiesitminItemstrequiredtruncmdt
propertiescCs�d|kr |jd|�dSt|t�tjj|jd�d�}|d}y&tj|�}tj	||d�Wn't
k
r�tj|d||�nXdS(NRs:Skipping module named %s, no 'runcmd' key in configurationtscriptsi�s"Failed to shellify %s into file %s(tdebugRtschematostpathtjoint	get_ipathRtshellifyt
write_filet	Exceptiontlogexc(R	tcfgtcloudtlogt_argstout_fntcmdtcontent((s>/usr/lib/python2.7/site-packages/cloudinit/config/cc_runcmd.pythandleQs	


(t__doc__tcloudinit.config.schemaRRtcloudinit.distrosRtcloudinit.settingsRt	cloudinitRRttextwrapRRtFalseRR-(((s>/usr/lib/python2.7/site-packages/cloudinit/config/cc_runcmd.pyt<module>	s<