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

38 lines
1.5 KiB
YAML
Raw Normal View History

2022-12-11 00:41:50 +01:00
- name: "system : auto_update : pod-service update script"
2022-12-10 21:39:04 +01:00
ansible.builtin.copy:
src: "./system/systemd/pod-service-auto-update"
dest: "/usr/local/sbin/pod-service-auto-update"
mode: 0755
2022-12-11 00:41:50 +01:00
- name: "system : auto_update : pod-service update service"
2022-12-10 21:39:04 +01:00
ansible.builtin.copy:
src: "./system/systemd/pod-service-auto-update.service"
dest: "/etc/systemd/user/pod-service-auto-update.service"
mode: 0644
register: services_base_system_pod_service_auto_update_service_file
2022-12-11 00:41:50 +01:00
- name: "system : auto_update : pod-service update timer"
2022-12-10 21:39:04 +01:00
ansible.builtin.copy:
src: "./system/systemd/pod-service-auto-update.timer"
dest: "/etc/systemd/user/pod-service-auto-update.timer"
mode: 0644
register: services_base_system_pod_service_auto_update_timer_file
2022-12-11 00:41:50 +01:00
- name: "system : auto_update : image prune service"
2022-12-10 21:39:04 +01:00
ansible.builtin.copy:
src: "./system/systemd/podman-image-prune.service"
dest: "/etc/systemd/user/podman-image-prune.service"
mode: 0644
register: services_base_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.
2022-12-11 00:41:50 +01:00
- name: "system : auto_update : systemd daemon reload for each service"
2022-12-10 21:39:04 +01:00
ansible.builtin.include_role:
name: "include"
tasks_from: "daemon_reload"
when:
services_base_system_pod_service_auto_update_service_file.changed or
services_base_system_pod_service_auto_update_timer_file.changed or
services_base_system_podman_image_prune_service_file.changed