separated autopull

master
Bastiaan Stroosnijder 8 months ago
parent dbde258cac
commit eca9dd6c57
  1. 5
      defaults/main.yml
  2. 11
      meta/main.yml
  3. 9
      tasks/main.yml
  4. 6
      templates/pilab-autopull.service.j2

@ -0,0 +1,5 @@
---
# Autopull
pilab_autopull_exec: /usr/bin/ansible-pull
pilab_autopull_schedule: "*-*-* 02:00:00"

@ -0,0 +1,11 @@
---
galaxy_info:
readme: README.md
license: GPL-3.0-or-later
authors:
- Bastiaan Stroosnijder <bas@strootje.com> (https://strootje.com)
repository: https://git.strooweb.nl/pilab/pilab-role-service-autopull
dependencies:
- src: git+https://git.strooweb.nl/pilab/pilab-role-common.git

@ -0,0 +1,9 @@
---
- loop:
- template: "{{ role_path }}/templates/pilab-autopull.service"
schedule: "{{ pilab_autopull_schedule }}"
when: pilab_autopull_repo is defined
ansible.builtin.include_role:
name: pilab-common
tasks_from: add-service

@ -0,0 +1,6 @@
[Unit]
Description=Pilab Autopull Service
[Service]
Type=oneshot
ExecStart={{ pilab_autopull_exec }} --only-if-changed --clean --url {{ pilab_autopull_repo }}
Loading…
Cancel
Save