def deploy(ip): copy('code/', ip + ':~/code', recursive=True) write_template('conf/config.py', ip + ':~/config.py') write_template('conf/crontab', ip + ':~/.crontab') write_template('conf/crontab', ip + ':/etc/apache2/httpd.conf') run_as_root('service cron restart') run_as_root('service apache restart') post('https://pingdom.com/api/2.0/checks', { 'name':ip, 'host':ip, 'type':'ping' }) タスクを実行するものと
![コードの可読性、ハッカビリティ、抽象化 | POSTD](https://cdn-ak-scissors.b.st-hatena.com/image/square/e7408d905ecf175274e2b7098c100a5712cbfea3/height=288;version=1;width=512/https%3A%2F%2Fpostd.cc%2Fwp%2Fwp-content%2Fuploads%2F2014%2F10%2Fmacbook-air-all-faded-and-stuff-500x333.jpg)