Specify service type for ansible-pull and backup
This commit is contained in:
parent
ca920a1f83
commit
49b156c5dc
@ -9,6 +9,7 @@ Wants=network-online.target
|
|||||||
[Service]
|
[Service]
|
||||||
User=ansible
|
User=ansible
|
||||||
Group=ansible
|
Group=ansible
|
||||||
|
Type=oneshot
|
||||||
Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg
|
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 }}"
|
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
|
Restart=on-failure
|
||||||
|
@ -5,6 +5,7 @@ After=network-online.target
|
|||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
MemoryMax=256M
|
MemoryMax=256M
|
||||||
ExecStart=/opt/backup.sh
|
ExecStart=/opt/backup.sh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user