<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>onozaty</author_name>
  <author_url>https://blog.hatena.ne.jp/onozaty/</author_url>
  <blog_title>Enjoy*Study</blog_title>
  <blog_url>https://blog.enjoyxstudy.com/</blog_url>
  <categories>
    <anon>[programming]</anon>
  </categories>
  <description>lineinfile Ansibleでファイルに行を追記したり置換したりした場合、lineinfileを使うことが多いと思いますが、複数行追加したい場合だと、ちょっとやりずらいところがあります。 下記のように書くと、テキスト内に指定した行の内容がなければ末尾に追加されるので、それを繰り返すことによって末尾に複数行入れられます。 tasks: - name: 末尾に複数行追加 lineinfile: dest=./test.txt line={{ item }} with_items: - '1行目' - '2行目' これが特定の箇所に入れようとすると面倒になります。 たとえば、insertaf…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.enjoyxstudy.com%2Fentry%2F2016%2F02%2F24%2F000000&quot; title=&quot;Ansibleで複数行を追加する(blockinfile) - Enjoy*Study&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>2016-02-24 00:00:00</published>
  <title>Ansibleで複数行を追加する(blockinfile)</title>
  <type>rich</type>
  <url>https://blog.enjoyxstudy.com/entry/2016/02/24/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
