<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>akira6592</author_name>
  <author_url>https://blog.hatena.ne.jp/akira6592/</author_url>
  <blog_title>てくなべ</blog_title>
  <blog_url>https://tekunabe.hatenablog.jp/</blog_url>
  <categories>
    <anon>ansible</anon>
  </categories>
  <description>■ はじめに Ansible というより、Jinja2 の機能ですが for によるループの中で、今何番目のループであるかを示すループインデックスなどの特殊な変数を利用できます。 例 変数名 値 loop.index 1 から始まるインデックス loop.index0 0 から始まるインデックス loop.irevindex 後ろから数えるインデックス（5要素ある場合は5から） loop.first 最初のループであれば True、それ以外は False loop.last 最後のループであれば True、それ以外は False この記事では簡単な例で動作を確認します。 [2019/08/20…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftekunabe.hatenablog.jp%2Fentry%2F2019%2F03%2F08%2Fansible_jinja2_loopindex&quot; title=&quot; [Ansible] Jinja2 でループインデックス(index/index0)などの特殊変数を利用する - てくなべ&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>https://cdn-ak.f.st-hatena.com/images/fotolife/a/akira6592/20170902/20170902221811.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-08 23:19:30</published>
  <title> [Ansible] Jinja2 でループインデックス(index/index0)などの特殊変数を利用する</title>
  <type>rich</type>
  <url>https://tekunabe.hatenablog.jp/entry/2019/03/08/ansible_jinja2_loopindex</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
