Update
This commit is contained in:
parent
fb79c80830
commit
b663cff493
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
from pyinfra import host
|
||||
from pyinfra.operations import apt, server, files, systemd
|
||||
|
||||
SUDO = True
|
||||
from pyinfra.facts.files import Directory
|
||||
from pyinfra.facts.systemd import SystemdEnabled
|
||||
|
||||
#server.user(
|
||||
# name='Add user benpro',
|
||||
|
@ -70,7 +70,7 @@ files.put(
|
|||
mode='400',
|
||||
)
|
||||
|
||||
if not host.fact.directory('/etc/letsencrypt/live/dns.benpro.fr'):
|
||||
if not host.get_fact(Directory, '/etc/letsencrypt/live/dns.benpro.fr'):
|
||||
server.shell(
|
||||
name='Add certificate',
|
||||
commands=[
|
||||
|
@ -124,7 +124,7 @@ server.shell(
|
|||
commands=['setcap \'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip\' AdGuardHome/AdGuardHome'],
|
||||
)
|
||||
|
||||
if host.fact.systemd_enabled['AdGuardHome.service'] == False:
|
||||
if host.get_fact(SystemdEnabled)['AdGuardHome.service'] == False:
|
||||
server.shell(
|
||||
name='Install Adguard systemd service file',
|
||||
chdir=host.data.app_dir,
|
||||
|
|
Binary file not shown.
Reference in a new issue