ansible-edda/playbooks/roles/services/setup/system/tasks/include/auto_update.yml

38 lines
1.5 KiB
YAML
Raw Normal View History

2022-12-12 23:49:20 +01:00
- name: "auto_update : pod-service update script"
ansible.builtin.copy:
src: "./auto_update/pod-service-auto-update"
dest: "/usr/local/sbin/pod-service-auto-update"
mode: 0755
- name: "auto_update : pod-service update service"
ansible.builtin.copy:
src: "./auto_update/pod-service-auto-update.service"
dest: "/etc/systemd/user/pod-service-auto-update.service"
mode: 0644
register: services_setup_system_pod_service_auto_update_service_file
2022-12-12 23:49:20 +01:00
- name: "auto_update : pod-service update timer"
ansible.builtin.copy:
src: "./auto_update/pod-service-auto-update.timer"
dest: "/etc/systemd/user/pod-service-auto-update.timer"
mode: 0644
register: services_setup_system_pod_service_auto_update_timer_file
2022-12-12 23:49:20 +01:00
- name: "auto_update : image prune service"
ansible.builtin.copy:
src: "./auto_update/podman-image-prune.service"
dest: "/etc/systemd/user/podman-image-prune.service"
mode: 0644
register: services_setup_system_podman_image_prune_service_file
2022-12-12 23:49:20 +01:00
# Include instead of import as otherwise the when clause is always applied which triggers errors if
# the above tasks haven't executed.
- name: "auto_update : systemd daemon reload for each service"
ansible.builtin.include_role:
2022-12-18 19:36:21 +01:00
name: "services/include"
2022-12-12 23:49:20 +01:00
tasks_from: "daemon_reload"
when:
services_setup_system_pod_service_auto_update_service_file.changed or
services_setup_system_pod_service_auto_update_timer_file.changed or
services_setup_system_podman_image_prune_service_file.changed