- name: Adding repositories tags: - install - repos include: includes/repos.yaml loop: "{{ linux_repos }}" loop_control: loop_var: repo - 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: not fontfile.stat.exists - 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: not joplin_app.stat.exists