aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/borg-client/tasks
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-02-19 16:05:48 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-02-19 16:05:48 +0100
commitd4de905ae685c750fa7f0b8f65db579d4aeec193 (patch)
tree5d8065380459cad047a7f4910698626c2eb5f750 /ansible/roles/borg-client/tasks
parentc48017bd76aa68513468a61e83dced9d0105bfba (diff)
downloadinfra-d4de905ae685c750fa7f0b8f65db579d4aeec193.tar.gz
infra-d4de905ae685c750fa7f0b8f65db579d4aeec193.tar.bz2
infra-d4de905ae685c750fa7f0b8f65db579d4aeec193.tar.xz
infra-d4de905ae685c750fa7f0b8f65db579d4aeec193.zip
borg-client: Making sure we're online before doing backup.
Diffstat (limited to 'ansible/roles/borg-client/tasks')
-rw-r--r--ansible/roles/borg-client/tasks/borg-client.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/ansible/roles/borg-client/tasks/borg-client.yml b/ansible/roles/borg-client/tasks/borg-client.yml
index 3d2d74a..4ddad49 100644
--- a/ansible/roles/borg-client/tasks/borg-client.yml
+++ b/ansible/roles/borg-client/tasks/borg-client.yml
@@ -78,6 +78,8 @@
content: |
[Unit]
Description=Create backup
+ After=network-online.target
+ Wants=network-online.target
[Service]
Type=oneshot
@@ -85,10 +87,8 @@
ExecStart=-/usr/local/bin/create-backup
ExecStartPost=-/usr/local/bin/create-backup-send-email root@trygvis.io
SuccessExitStatus=0 1
- After=network-online.target
- Wants=network-online.target
notify:
- - systemd daemon-reload
+ - systemctl daemon-reload
- name: /etc/systemd/system/create-backup.timer
copy:
@@ -103,7 +103,7 @@
[Install]
WantedBy=timers.target
notify:
- - systemd daemon-reload
+ - systemctl daemon-reload
- service start create-backup.timer
# TODO: remove
@@ -112,4 +112,4 @@
state: absent
register: create_backup_send_email_service
notify:
- - systemd daemon-reload
+ - systemctl daemon-reload