Compare commits
10 commits
834bab3dec
...
b663cff493
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b663cff493 | ||
![]() |
fb79c80830 | ||
![]() |
ce6f46b961 | ||
![]() |
a559bc22d3 | ||
![]() |
9bf2d5d8db | ||
![]() |
b133b11bff | ||
![]() |
67f79aa178 | ||
![]() |
c855285527 | ||
![]() |
f4a6458c73 | ||
![]() |
0fed537544 |
3 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
from pyinfra import host
|
from pyinfra import host
|
||||||
from pyinfra.operations import apt, server, files, systemd
|
from pyinfra.operations import apt, server, files, systemd
|
||||||
|
from pyinfra.facts.files import Directory
|
||||||
SUDO = True
|
from pyinfra.facts.systemd import SystemdEnabled
|
||||||
|
|
||||||
#server.user(
|
#server.user(
|
||||||
# name='Add user benpro',
|
# name='Add user benpro',
|
||||||
|
@ -70,7 +70,7 @@ files.put(
|
||||||
mode='400',
|
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(
|
server.shell(
|
||||||
name='Add certificate',
|
name='Add certificate',
|
||||||
commands=[
|
commands=[
|
||||||
|
@ -124,7 +124,7 @@ server.shell(
|
||||||
commands=['setcap \'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip\' AdGuardHome/AdGuardHome'],
|
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(
|
server.shell(
|
||||||
name='Install Adguard systemd service file',
|
name='Install Adguard systemd service file',
|
||||||
chdir=host.data.app_dir,
|
chdir=host.data.app_dir,
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Reference in a new issue