ansible-edda/plays/services/roles/setup_system/tasks/include/auto_update.yml

38 lines
1.4 KiB
YAML

- 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_system_pod_service_auto_update_service_file
- 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_system_pod_service_auto_update_timer_file
- 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_system_podman_image_prune_service_file
# 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:
name: "include"
tasks_from: "daemon_reload"
when:
services_system_pod_service_auto_update_service_file.changed or
services_system_pod_service_auto_update_timer_file.changed or
services_system_podman_image_prune_service_file.changed