- name: Apt public GPG keys tags: - install - repos apt_key: state: present url: "{{ item }}" loop: "{{ linux_repos_keys }}" become: true - name: Adding repositories tags: - install - repos apt_repository: repo: "{{ item }}" state: present loop: "{{ linux_repos }}" become: true - name: Installing packages tags: - install - packages package: name: "{{ item }}" state: present loop: "{{ linux_packages }}" become: true - name: Installing Snaps tags: - install - snaps # snap: # name: "{{ item }}" # state: present command: "snap install {{ item }}" loop: "{{ linux_apps }}" become: true - name: Ensure shared fonts directory exists tags: - install - fonts file: path: '~/.local/share/fonts' state: directory - name: Checking for Modern Pictogram font tags: - install - fonts stat: path: '~/.local/share/fonts/modernpics.otf' register: fontfile - name: Installing fonts tags: - install - fonts block: - name: Create temporary file for Modern Pictograms font tempfile: state: file suffix: '.zip' register: fontzip - name: Download Modern Pictograms font get_url: url: https://www.fontsquirrel.com/fonts/download/modern-pictograms dest: "{{ fontzip.path }}" force: true register: fetchurl - name: Unzip Modern Pictograms font unarchive: src: "{{ fontzip.path }}" dest: '~/.local/share/fonts' exclude: '*.txt' - name: Remove temporary file file: path: "{{ fontzip.path }}" state: absent - name: Refresh font cache command: 'fc-cache -f' when: fontfile.stat.exists == false - name: Platform specific packages tags: - install - platform package: name: "{{ item }}" state: present loop: "{{ lookup('vars', ansible_system_vendor + '_' + ansible_form_factor + '_packages', default=[]) }}" become: true - name: 'Gnome extensions' tags: - install - gnome block: - name: Galaxy role to install Gnome extensions command: ansible-galaxy install jaredhocutt.gnome_extensions - name: Include jaredhocutt.gnome_extensions include_role: name: jaredhocutt.gnome_extensions - name: 'Joplin: Check installation' tags: - install - joplin stat: path: "{{ '~/.joplin/Joplin.AppImage' | expanduser }}" register: joplin_app - name: 'Joplin' tags: - install - joplin block: - name: 'Joplin: Create directory' file: path: "{{ '~/.joplin' | expanduser }}" state: directory - name: 'Joplin: Fetch latest version number' shell: 'curl --silent https://api.github.com/repos/laurent22/joplin/releases/latest | grep -Po "\"tag_name\": \"v\K.*?(?=\")"' register: joplin_version - name: "Joplin: Fetch latest version ({{ joplin_version.stdout }})" get_url: url: "https://github.com/laurent22/joplin/releases/download/v{{ joplin_version.stdout }}/Joplin-{{ joplin_version.stdout }}-x86_64.AppImage" dest: "{{ '~/.joplin/Joplin.AppImage' | expanduser }}" mode: '0500' when: joplin_app.stat.exists == false