This repository has been archived on 2023-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
pyinfra-linkding/remove.py

17 lines
466 B
Python
Raw Normal View History

2021-11-15 13:23:45 +00:00
from pyinfra import host
from pyinfra.operations import server, files
if host.fact.file(host.data.undocker_cache+'/photoprism.tar'):
server.shell(
name='Remove photoprism Docker image',
chdir=host.data.undocker_cache,
commands=['rm photoprism.tar'],
)
if host.fact.directory(host.data.undocker_dst):
server.shell(
name='Remove undocker destination',
commands=['rm -rf {}'.format(host.data.undocker_dst)],
)