This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -R -i -E "\s+_\w+ \=" /usr/lib/python3.10/site-packages/ansible/playbook/* -o | sed 's/\s_//g' | tr -d = | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import configparser | |
def ini_to_json(ini): | |
"""Convert ini string to a dictionary and return it.""" | |
config = configparser.ConfigParser(default_section=None, | |
interpolation=None) | |
config.read_string(ini) | |
config_dict = defaultdict(dict) | |
for section in config.sections(): |