Modify ansible-pull and backup services to only run when connected to the internet

This commit is contained in:
Salt 2021-01-16 23:19:28 -06:00
parent c3743ee5a5
commit abcfaea0a5
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,8 @@
Description=Ansible pull service Description=Ansible pull service
StartLimitIntervalSec=3600 StartLimitIntervalSec=3600
StartLimitBurst=5 StartLimitBurst=5
After=network-online.target
Wants=network-online.target
[Service] [Service]
User=ansible User=ansible

View File

@ -1,6 +1,8 @@
# vim:ft=systemd # vim:ft=systemd
[Unit] [Unit]
Description=Nightly backup service Description=Nightly backup service
After=network-online.target
Wants=network-online.target
[Service] [Service]
MemoryMax=256M MemoryMax=256M