- name: "Add apt key for Signal" apt_key: url: "https://updates.signal.org/desktop/apt/keys.asc" state: present - name: "Add Signal repository" apt_repository: repo: "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" state: present - name: "Add apt key for Brave" apt_key: url: "{{ brave_key }}" state: present - name: "Add Brave repository" apt_repository: repo: "{{ brave_repo }}" state: present - name: "Add Touchegg repository" apt_repository: repo: "ppa:touchegg/stable" state: present - name: "Install Packages" apt: state: present name: "{{ packages }}" update_cache: yes - name: check packages package_facts: manager: auto - name: "Check if KeeWeb is installed" package: name: "keeweb-desktop={{ keeweb_version }}-*" state: present ignore_errors: true register: keeweb_check when: "'keeweb-desktop' in ansible_facts.packages" - name: "Download Keeweb" get_url: url: "{{ keeweb_url }}" dest: /tmp/keeweb.deb when: keeweb_check is skipped register: keeweb_download - name: "Install keeweb" apt: deb: /tmp/keeweb.deb when: keeweb_download is changed - name: "Add Nextcloud repository" apt_repository: repo: ppa:nextcloud-devs/client - name: "Install Nextcloud client" apt: name: "nextcloud-desktop" state: present - name: "Download VSCode" get_url: url: "{{ vscode_url }}" dest: /tmp/vscode.deb register: vscode_download when: "'code' not in ansible_facts.packages" - name: "Install Visual Studio Code" apt: deb: /tmp/vscode.deb when: vscode_download is changed - name: "Copy the MPV config" copy: src: "mpv_input.conf" dest: "/home/{{ desktop_user }}/.config/mpv/input.conf" - name: "Install snap packages" snap: name: "{{ snap_packages }}" state: present - name: "Install pip packages" pip: name: "{{ pip_packages }}" state: present become_user: "{{ desktop_user }}" - name: "Add the flathub flatpak repository remote to the user installation" flatpak_remote: name: flathub state: present flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo method: user become_user: "{{ desktop_user }}" - name: "Install Flatpak packages" flatpak: name: "{{ item }}" state: present method: user become_user: "{{ desktop_user }}" loop: "{{ flatpak_packages }}" - name: "Add {{ desktop_user}} to the docker group" user: name: "{{ desktop_user }}" groups: docker append: yes - name: "Copy the powertop service file" copy: src: "powertop.service" dest: "/etc/systemd/system/powertop.service" owner: root group: root mode: 0644 notify: "Enable powertop.service"