API Reference¶
- class exasol.ansible.ImportlibRepository(package: Any)[source]¶
Bases:
RepositoryRepresents a repository containing ansible files (roles, playbooks, tasks, etc.). The repository is expected to be located within a Python module. Supports copy of the ansible files to a target folder.
- class exasol.ansible.Host(name: str, ssh_private_key: pathlib.Path | None = None)[source]¶
- class exasol.ansible.Facts(raw: dict[str, Any], prefixes: list[str] | None = None)[source]¶
Access values in a nested dictionary via key sequences.
- as_dict(spec: dict[str, tuple[str, ...]]) → dict[str, Any][source]¶
Parameter
specmaps output entries to a tuple of access keys. Each output entry is a string, while the access keys is tuple of keys to access the nested entries.spec = { “output-entry”: (“key-1”, “key-2”) }
Method as_dict() returns the the dict with the access keys being replaced by the value retrieved from the entries. If None is returned for a key tuple, then the output-entry is missing in the resulting dict.
Here is an example:
spec = {“E1”: (“a”, “b”), “E2”: (“a”, “c”)} DictAccessor({“a”: {“b”: “value”}}).as_dict(spec)
will return {“E1”: “value”}