<?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>SQL の where 句のように ディクショナリのリストから抽出するには selectattr を利用 以下のようなディクショナリのリストがあるとします。DBにおけるテーブルのデータのような構造です。 users: - name: yamada age: 42 - name: tanaka age: 26 - name: suzuki age: 32 - name: sato age: 27 ここで、「 name が sato であるディクショナリのリスト」を抽出したい場合は、 selectattr を利用して以下のようにフィルター（Jinja2の機能）します。 selectattr による…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftekunabe.hatenablog.jp%2Fentry%2F2018%2F10%2F13%2Fansible_selectattr&quot; title=&quot;【Ansible】データから「select * from users where name=&amp;quot;hoge&amp;quot;」的な抽出ができる selectattr - てくなべ&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>2018-10-13 20:37:03</published>
  <title>【Ansible】データから「select * from users where name=&quot;hoge&quot;」的な抽出ができる selectattr</title>
  <type>rich</type>
  <url>https://tekunabe.hatenablog.jp/entry/2018/10/13/ansible_selectattr</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
