Specify service type for ansible-pull and backup

This commit is contained in:
Salt 2021-01-16 23:47:29 -06:00
parent ca920a1f83
commit 49b156c5dc
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -5,6 +5,7 @@ After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
MemoryMax=256M
ExecStart=/opt/backup.sh