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-photoprism/remove.py

17 lines
466 B
Python

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)],
)