<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>masasuz</author_name>
  <author_url>https://blog.hatena.ne.jp/masasuz/</author_url>
  <blog_title>ふり返る暇なんて無いね</blog_title>
  <blog_url>https://diary.masasuzu.net/</blog_url>
  <categories>
    <anon>tech</anon>
  </categories>
  <description>A. env.host を使うと良い。 hostによって配るcrontabが違っていて、レポジトリ的には ${HOSTNAME}.crontab みたいな感じでhost名を含むファイル名で置いてあるときに、どうしたらうまく配れるかなと考えた結果 env.host で実行中のhost名が取れるのでそいつを利用した。 from fabric.api import sudo, env from fabric.decorators import task @task def some_task(project): src = &quot;/opt/%s/config/crontab/%s.crontab&quot; % …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdiary.masasuzu.net%2Fentry%2F2015%2F12%2F14%2F131907&quot; title=&quot;fabricで現在実行中のhostを取りたい - ふり返る暇なんて無いね&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-12-14 13:19:07</published>
  <title>fabricで現在実行中のhostを取りたい</title>
  <type>rich</type>
  <url>https://diary.masasuzu.net/entry/2015/12/14/131907</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
