<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hirokiky</author_name>
  <author_url>https://blog.hatena.ne.jp/hirokiky/</author_url>
  <blog_title>Make組ブログ</blog_title>
  <blog_url>https://blog.hirokiky.org/</blog_url>
  <categories>
    <anon>Ansible</anon>
  </categories>
  <description>Ansibleでファイルが存在しているかによって処理を分けたいことがあります。 そんなときは stat を使うとできますが、対象のファイルが数GB単位で大きいと処理が遅くなります。 下の例ではファイルが存在しないときだけ実行するタスクを書いています。 - name: とあるファイルが存在しているかチェックする stat: path: /path/to/file register: the_file_stat - name: （ファイルが存在してないときだけやりたい処理） shell: ... when: the_file_stat.stat.exists == False ですがこの stat…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.hirokiky.org%2Fentry%2F2018%2F08%2F27%2F205604&quot; title=&quot;Ansibleでファイルの存在確認にstatを使ったら大きいファイルには動作が遅すぎたのでやったこと - Make組ブログ&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>2018-08-27 20:56:04</published>
  <title>Ansibleでファイルの存在確認にstatを使ったら大きいファイルには動作が遅すぎたのでやったこと</title>
  <type>rich</type>
  <url>https://blog.hirokiky.org/entry/2018/08/27/205604</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
