7 lines
193 B
Python
7 lines
193 B
Python
from pyinfra.facts.files import File
|
|
from pyinfra.operations import server
|
|
from pyinfra.context import host
|
|
|
|
if host.get_fact(File, "/var/run/reboot-required"):
|
|
server.reboot(_sudo = True)
|