Merge pull request 'fix-flatpak-autoupdate' (#5) from fix-flatpak-autoupdate into main
Reviewed-on: #5
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=flatpak Automatic Update
|
||||
Documentation=man:flatpak(1)
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 5; done;'
|
||||
ExecStart=/usr/bin/flatpak update -y
|
||||
@@ -7,17 +7,18 @@
|
||||
ansible.builtin.include: flatpaks.yml
|
||||
when: flatpak_alter_flatpaks | bool
|
||||
|
||||
# https://github.com/flatpak/flatpak/issues/3847#issuecomment-818532856
|
||||
- name: Enable flatpak Automatic Update
|
||||
ansible.builtin.copy:
|
||||
ansible.builtin.template:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/systemd/system/{{ item }}"
|
||||
dest: "/etc/systemd/system/{{ item | regex_replace('.j2', '') }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
become: yes
|
||||
with_items:
|
||||
- flatpak-automatic.service
|
||||
- flatpak-automatic.timer
|
||||
- flatpak-automatic.service.j2
|
||||
- flatpak-automatic.timer.j2
|
||||
notify:
|
||||
- Enable flatpak-automatic
|
||||
when: flatpak_automatic_updates | bool
|
||||
|
||||
10
roles/flatpak/templates/flatpak-automatic.service.j2
Normal file
10
roles/flatpak/templates/flatpak-automatic.service.j2
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=flatpak Automatic Update
|
||||
Documentation=man:flatpak(1)
|
||||
|
||||
[Service]
|
||||
Environment='DISPLAY={{ ansible_facts["env"]["DISPLAY"] }}'
|
||||
Environment='DBUS_SESSION_BUS_ADDRESS={{ ansible_facts["env"]["DBUS_SESSION_BUS_ADDRESS"] }}'
|
||||
Type=simple
|
||||
ExecStartPre=nm-online
|
||||
ExecStart=/usr/bin/flatpak update -y
|
||||
Reference in New Issue
Block a user