mirror of
https://github.com/kiviktnm/decman.git
synced 2026-09-19 12:08:28 +00:00
21 lines
518 B
Python
21 lines
518 B
Python
import os
|
|
|
|
import decman
|
|
|
|
|
|
class Example(decman.Plugin):
|
|
NAME = "example"
|
|
|
|
def available(self) -> bool:
|
|
return os.path.exists("/tmp/example_plugin_available")
|
|
|
|
def process_modules(self, store: decman.Store, modules: list[decman.Module]):
|
|
# Toy example for setting modules as changed
|
|
for module in modules:
|
|
module._changed = True
|
|
|
|
def apply(
|
|
self, store: decman.Store, dry_run: bool = False, params: list[str] | None = None
|
|
) -> bool:
|
|
return True
|