<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Ec2_vol - Tag - Filipe Felisbino</title><link>https://felisbino.dev/tags/ec2_vol/</link><description>Ec2_vol - Tag - Filipe Felisbino</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 03 Dec 2015 00:00:00 +0000</lastBuildDate><atom:link href="https://felisbino.dev/tags/ec2_vol/" rel="self" type="application/rss+xml"/><item><title>Ansible: Flattening a list of dicts to a single dict</title><link>https://felisbino.dev/posts/ansible-flattening-list-of-dicts/</link><pubDate>Thu, 03 Dec 2015 00:00:00 +0000</pubDate><author>Filipe Felisbino</author><guid>https://felisbino.dev/posts/ansible-flattening-list-of-dicts/</guid><description><![CDATA[<p>Ansible is a great tool for automation. It has lots of modules that makes our lives easier. As a heavy-user of ansible for infrastructure provisioning on AWS, I sometimes get frustrated to have to deal with different data structures used by modules.</p>
<p>One example I had to deal with recently was the tags attribute of ec2_asg and ec2_tag. You cannot just pass the same value for both of them because ec2_asg tags attribute expects a list of dicts, while ec2_tag expects just a dict. That difference is because ec2_asg&rsquo;s dicts have an optional attribute called <em>propagate_at_launch</em>.</p>]]></description></item></channel></rss>