<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zaki-hmkc</author_name>
  <author_url>https://blog.hatena.ne.jp/zaki-hmkc/</author_url>
  <blog_title>zaki work log</blog_title>
  <blog_url>https://zaki-hmkc.hatenablog.com/</blog_url>
  <categories>
    <anon>Ansible</anon>
    <anon>tech</anon>
  </categories>
  <description>配列や、辞書の配列の中から特定の条件の要素を抜き出す。 配列操作はselect()で要素に対してフィルター処理を行い、辞書操作はselectattr()でkey指定することでvalueにフィルター処理を行う。 ここでいうフィルター処理は、AnsibleやJinja2のフィルターのことではなく、AnsibleやJinja2のTest(被演算子/operatorと言うと個人的にはわかりやすいんだけど、「被演算子」という表記は特に無く、Jinja2だとisを使った被演算子の方で関数的に使用)を使って要素をフィルタリングすることを指す。 Jinja2のTests AnsibleのTests Ansib…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzaki-hmkc.hatenablog.com%2Fentry%2F2021%2F02%2F18%2F000228&quot; title=&quot; [Ansible / Jinja2] select / selectattr を使った配列と辞書のフィルタリング - zaki work log&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>2021-02-18 00:02:28</published>
  <title> [Ansible / Jinja2] select / selectattr を使った配列と辞書のフィルタリング</title>
  <type>rich</type>
  <url>https://zaki-hmkc.hatenablog.com/entry/2021/02/18/000228</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
