Skip to content

Instantly share code, notes, and snippets.

View danieldbower's full-sized avatar

Daniel Bower danieldbower

View GitHub Profile
@danieldbower
danieldbower / xmlfile.py
Last active March 28, 2017 13:29 — forked from benbramley/xmlfile.py
Ansible lookup plugin for XML files
from __future__ import (absolute_import, division)
__metaclass__ = type
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible.utils.listify import listify_lookup_plugin_terms
import xml.etree.ElementTree as etree
# Version for Ansible 2.0
# forked from https://gist.github.com/benbramley/xmlfile.py