Move pyinfra-* libraries into lib/
This commit is contained in:
commit
619e1463f1
1
pyinfra_nginx/__init__.py
Normal file
1
pyinfra_nginx/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
from .nginx import deploy_nginx
|
23
pyinfra_nginx/nginx.py
Normal file
23
pyinfra_nginx/nginx.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
"""
|
||||||
|
nginx deploy
|
||||||
|
"""
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
|
from pyinfra import host
|
||||||
|
from pyinfra.api.deploy import deploy
|
||||||
|
from pyinfra.operations import files, server, apt
|
||||||
|
from pyinfra.facts.deb import DebPackages
|
||||||
|
|
||||||
|
def _install_nginx():
|
||||||
|
if not host.get_fact(DebPackages):
|
||||||
|
raise DeployError(("Can't deploy prerequisites on non-deb system"))
|
||||||
|
|
||||||
|
apt.packages(
|
||||||
|
name = "Install nginx-extras",
|
||||||
|
packages = ["nginx-extras"],
|
||||||
|
_sudo = True,
|
||||||
|
)
|
||||||
|
|
||||||
|
@deploy("Deploy nginx")
|
||||||
|
def deploy_nginx():
|
||||||
|
_install_nginx()
|
6
pyproject.toml
Normal file
6
pyproject.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=45"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "pyinfra-mailcow"
|
Loading…
Reference in a new issue