ez_docker/plugins/modules/service_docker_in_docker.py
2024-10-23 17:15:37 +02:00

48 lines
812 B
Python

#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2024, Luca Bilke <luca@bil.ke>
# MIT License (see LICENSE)
# TODO: write ansible sections
DOCUMENTATION = r"""
"""
EXAMPLES = r"""
"""
RETURN = r"""
"""
from __future__ import annotations # pyright: ignore[reportGeneralTypeIssues]
from ansible_collections.snailed.ez_compose.plugins.module_utils.common import (
State,
run_service,
update_service,
)
def helper(state: State) -> State:
command = state.module.params.get("command")
update = {
"privileged": True,
}
if command:
update["command"] = command
return update_service(state, update)
def main():
extra_args = {
"command": {"type": "list"},
}
run_service(extra_args, helper)
if __name__ == "__main__":
main()