# workstation ~~ roles/workstation/tasks/main.yml # init workstation --- - name: retrieve BECOME method stat: path=/usr/bin/doas register: ws_become - name: retrieve host facts set_fact: ws_distribution: "{{ ansible_distribution | lower }}" ansible_become_method: "{{ 'doas' if ws_become.stat.exists else 'sudo' }}" ansible_become_user: root - name: download development packages package: name="{{ item }}" state=present loop: # DEVEL - base - base-devel - go # EDITOR - emacs - neovim - python-neovim - py3-neovim # PYTHON - python-pip - py3-pip - python-requests - py3-requests - python-jedi - py3-jedi # UTILS - i3 - i3status - gnupg - py3-pip - python-pip - zsh - zip - unzip - tar - git - curl - wget - wireguard - wireguard-dkms - wireguard-tools # PRIVACY - tor - tor-browser - torsocks # MULTIMEDIA - qutebrowser - firefox - feh - imv - mpv - cmus - vlc - syncthing failed_when: false ignore_errors: true tags: packages - name: flush fonts cache shell: fc-cache -fv - name: check for distribution specific task stat: path="{{ role_path }}/tasks/setup_{{ ws_distribution }}.yml" register: ws_distribution_task - debug: var: ws_distribution_task - name: include distribution specific task include_tasks: "setup_{{ ws_distribution }}.yml" when: ws_distribution_task.stat.exists - name: gracefully stop playbook and skip testing tasks meta: end_host - name: download dotfiles configuration repository git: repo: "{{ workstation_git_root }}/dot-config" dest: "{{ workstation_dotfiles_dir }}/config" bare: true