{"id":27604,"date":"2017-05-22T21:48:25","date_gmt":"2017-05-22T19:48:25","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=27604"},"modified":"2017-05-22T21:48:25","modified_gmt":"2017-05-22T19:48:25","slug":"listing-iterating-and-loading-json-in-ansible-playbooks","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2017\/05\/22\/listing-iterating-and-loading-json-in-ansible-playbooks\/","title":{"rendered":"Listing, Iterating, and Loading JSON in Ansible Playbooks"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"http:\/\/www.myteneo.net\/blog\/-\/blogs\/listing-iterating-and-loading-json-in-ansible-playbooks\/\">Listing, Iterating, and Loading JSON in Ansible Playbooks<\/a> &#8211; for those days when you need to offload part of your configuration onto external JSON files, but don&#8217;t have a spare day to try, fail and repeat.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Listing, Iterating, and Loading JSON in Ansible Playbooks &#8211; for those days when you need to offload part of your configuration onto external JSON files, but don&#8217;t have a spare day to try, fail and repeat.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Listing, Iterating, and Loading JSON in Ansible Playbooks #Ansible #JSON #SysAdmin","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,133,62],"tags":[3383,3195,3306],"keyring_services":[],"class_list":["post-27604","post","type-post","status-publish","format-standard","hentry","category-general","category-sysadmin","category-technology","tag-ansible","tag-configuration-management","tag-json"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27259,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/01\/20\/parsing-text-printouts-within-ansible-playbooks\/","url_meta":{"origin":27604,"position":0},"title":"Parsing text printouts within Ansible playbooks","author":"Leonid Mamchenkov","date":"January 20, 2017","format":false,"excerpt":"I'm sure this will come handy soon, and I'll be spending too much time trying to figure it out without this article:\u00a0Parsing text printouts within Ansible playbooks. It's not every day that you see regular expression examples in the Ansible playbooks...","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26860,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/11\/08\/install-ansible-2-0-on-amazon-ami\/","url_meta":{"origin":27604,"position":1},"title":"Install Ansible 2.0+ on Amazon AMI","author":"Leonid Mamchenkov","date":"November 8, 2016","format":false,"excerpt":"Today, while upgrading some of my Ansible roles I've hit the problem. \u00a0Some of the newer roles require Ansible 2.0. \u00a0My Amazon AMI machine that runs the playbooks was still on version 1.9. \u00a0EPEL repository doesn't seem to have the newer Ansible version yet. \u00a0Gladly, Google brough in this StackOverflow\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":25986,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/04\/01\/first-attempt-at-ansible\/","url_meta":{"origin":27604,"position":2},"title":"First attempt at Ansible","author":"Leonid Mamchenkov","date":"April 1, 2016","format":false,"excerpt":"After all the reading about Ansible that I've done yesterday, I woke up today with a strong will to try it out. \u00a0Running a few \"hello world\" examples wasn't illustrative enough, so I decided to migrate my dotfiles repository from Puppet to Ansible. \u00a0This would provide just enough complexity to\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27263,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/01\/20\/immutable-infrastructure-with-aws-and-ansible\/","url_meta":{"origin":27604,"position":3},"title":"Immutable Infrastructure with AWS and Ansible","author":"Leonid Mamchenkov","date":"January 20, 2017","format":false,"excerpt":"Immutable infrastructure is a very powerful concept that brings stability, efficiency, and fidelity to your applications through automation and the use of successful patterns from programming. \u00a0The general idea is that you never make changes to running infrastructure. \u00a0Instead, you ensure that all infrastructure is created through automation, and to\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27398,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/03\/08\/how-to-use-git-to-manage-your-user-configuration-files\/","url_meta":{"origin":27604,"position":4},"title":"How To Use Git to Manage your User Configuration Files","author":"Leonid Mamchenkov","date":"March 8, 2017","format":false,"excerpt":"There is probably a gadzillion different ways that you can manage and synchronize you configuration files (aka dotfiles) between different Linux\/UNIX boxes - anything from custom symlink scripts, all the way to configuration management tools like Puppet and Ansible. \u00a0Here are a few options to look at if you are\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27408,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/03\/11\/validating-json-against-schema-in-php\/","url_meta":{"origin":27604,"position":5},"title":"Validating JSON against schema in PHP","author":"Leonid Mamchenkov","date":"March 11, 2017","format":false,"excerpt":"GitHub was rather slow yesterday, which affected the speed of installing composer dependencies (since most of them are hosted on GitHub anyway). \u00a0Staring at a slowly scrolling list of installed dependencies, I noticed something interesting. Of course, I've heard of the seld\/jsonlint before. \u00a0It's a port of zaach\/jsonlint JavaScript tool\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=27604"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27604\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=27604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=27604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=27604"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=27604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}