This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
spadinastan/tasks.py

31 lines
626 B
Python
Raw Normal View History

import invoke
import plex.tasks
2022-09-04 16:47:18 +00:00
import deluge.tasks
import kong.tasks
ns = invoke.Collection()
PYINFRA_COMMON_PREFIX = "pyinfra -vvv pyinfra/inventory.py"
@invoke.task()
def system_updates(ctx):
ctx.run(f"{PYINFRA_COMMON_PREFIX} pyinfra/system_updates.py")
@invoke.task()
def system_reboot(ctx):
ctx.run(f"{PYINFRA_COMMON_PREFIX} pyinfra/reboot.py")
server = invoke.Collection("server")
server.add_task(system_updates, name="update")
server.add_task(system_reboot, name="reboot")
ns.add_collection(plex.tasks.ns)
2022-09-04 16:47:18 +00:00
ns.add_collection(deluge.tasks.ns)
ns.add_collection(kong.tasks.ns)
ns.add_collection(server)