diff --git a/ci-inventory.yaml b/ci-inventory.yaml index f89e3fe..48402d1 100644 --- a/ci-inventory.yaml +++ b/ci-inventory.yaml @@ -49,12 +49,14 @@ local: #- git #- gitk #- gnome-tweaks - #- keepassxc #- nextcloud-desktop - tig #- vlc #- xournal + basic_utils: + enable_keepassxc: true + git: config: user_name: "User" diff --git a/playbook.yml b/playbook.yml index e6fd6e9..fff1c7a 100644 --- a/playbook.yml +++ b/playbook.yml @@ -47,6 +47,8 @@ - role: ansible-role-visual-studio-code when: enable_visula_studio_code | default(false) + - role: basic_utils + post_tasks: - include_tasks: tasks/ubuntu_cleanup.yml when: enable_ubuntu_cleanup | default(false) diff --git a/roles/basic_utils/handlers/main.yml b/roles/basic_utils/handlers/main.yml new file mode 100644 index 0000000..5ffef82 --- /dev/null +++ b/roles/basic_utils/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: Reload desktop database + command: update-desktop-database diff --git a/roles/basic_utils/meta/main.yml b/roles/basic_utils/meta/main.yml new file mode 100644 index 0000000..8f854df --- /dev/null +++ b/roles/basic_utils/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: flatpak diff --git a/roles/basic_utils/tasks/main.yml b/roles/basic_utils/tasks/main.yml new file mode 100644 index 0000000..f62da3c --- /dev/null +++ b/roles/basic_utils/tasks/main.yml @@ -0,0 +1,29 @@ +- name: basic_utils print var + debug: + var: basic_utils + +# region keepassxc +- name: install keepassxc flatpak + when: basic_utils.enable_keepassxc | default(false) + command: flatpak install flathub org.keepassxc.KeePassXC --assumeyes + +- name: Modify Desktop file + become: true + lineinfile: + dest="/var/lib/flatpak/app/org.keepassxc.KeePassXC/current/active/files/share/applications/org.keepassxc.KeePassXC.desktop" + line="{{ item.line }}" + regexp="{{ item.regexp }}" + state=present + insertafter=EOF + create=True + mode="u+rw" + with_items: + - { regexp: "^Exec=", line: "Exec=keepassxc --platform xcb %f" } + - { regexp: "^TryExec=", line: "TryExec=keepassxc --platform xcb" } + notify: + - Reload desktop database +# manually to do: +# enable ssh-agent integration +# enable auto type for shortcut + +# endregion diff --git a/roles/flatpak/tasks/main.yml b/roles/flatpak/tasks/main.yml new file mode 100644 index 0000000..ea9583c --- /dev/null +++ b/roles/flatpak/tasks/main.yml @@ -0,0 +1,4 @@ +- name: install flatpak + become: true + package: + name: flatpak