From 49b156c5dcabc376f25a1f03f8ae5bc8653eb34c Mon Sep 17 00:00:00 2001 From: Salt Date: Sat, 16 Jan 2021 23:47:29 -0600 Subject: [PATCH] Specify service type for ansible-pull and backup --- roles/ansible-pull/templates/ansible-pull.service | 1 + roles/backup/templates/backup.service | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/ansible-pull/templates/ansible-pull.service b/roles/ansible-pull/templates/ansible-pull.service index dafdf67..f23d8c2 100644 --- a/roles/ansible-pull/templates/ansible-pull.service +++ b/roles/ansible-pull/templates/ansible-pull.service @@ -9,6 +9,7 @@ Wants=network-online.target [Service] User=ansible Group=ansible +Type=oneshot Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg ExecStart=ansible-pull --accept-host-key -U "{{ ansible_pull_repo }}" -C "{{ ansible_pull_commit }}" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" "{{ ansible_pull_playbook }}" Restart=on-failure diff --git a/roles/backup/templates/backup.service b/roles/backup/templates/backup.service index 0320e15..7106cb1 100644 --- a/roles/backup/templates/backup.service +++ b/roles/backup/templates/backup.service @@ -5,6 +5,7 @@ After=network-online.target Wants=network-online.target [Service] +Type=oneshot MemoryMax=256M ExecStart=/opt/backup.sh