Wrapping a Salt Module (opens in new tab)
I use Since I wanted to wrap the docker_container module, I started by creating my own state in _states/docker_customized. I can do a simple naive version, just by using setdefault # _states/docker_customized.py def running(name, **kwargs): kwargs.setdefault("mem_limit", "1024M") kwargs.setdefault("oom_score_adj", 100) return __states__"docker_container.running" If I then do a find replace on s/docker_container.running/docker_customized.running/g, then when I use state.apply on a target, it w...
Read the original article