Latest news from Midwesternmac.com - Technology feed

Latest news from Midwesternmac.com - Technology feed

  1. Changing a deeply-nested dict variable in an Ansible playbook

    06.19 / 17:00 midwesternmac.com Midwesternmac.com - Technology
    I recently had to build an Ansible playbook that takes in a massive inventory structure (read from a YAML file), modifies a specific key in that file, then dumps the file back to disk. There are some other ways that may be more efficient standalone (e.g. using a separate Python/PHP/Ruby/etc. script and a good YAML library), but since I had to do a number of other things in this Ansible playbook, I thought it would keep it simple if I could also modify the key inside the playbook. I was…