--- - name: Install packages hosts: bigboy-wsl vars: ansible_python_interpreter: '/usr/bin/python3' tasks: - name: Install Microsoft keys and repo become: true ansible.builtin.apt: state: present force: true deb: https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb - name: Base packages from apt become: true ansible.builtin.apt: update_cache: true state: latest pkg: - bat - bundler - cmake - dconf-editor - dos2unix - exa - gh - git - git-lfs - gnupg - htop - httpie - hub - hugo - iftop - jq - libssl-dev - neofetch - pass - pcsc-tools - pcscd - powershell - rake - ruby - ruby-dev - scdaemon - snapd - tilix - traceroute - tree - vim - xclip - zsh - name: Install git-credential-manager deb package become: true ansible.builtin.apt: state: present deb: https://github.com/GitCredentialManager/git-credential-manager/releases/download/v2.0.696/gcmcore-linux_amd64.2.0.696.deb - name: Install delta via deb package on GitHub become: true ansible.builtin.apt: state: present deb: https://github.com/dandavison/delta/releases/download/0.13.0/git-delta_0.13.0_amd64.deb - name: Base packages from Snapcraft become: true community.general.snap: name: - cctv-viewer # only available here - name: hiera-eyaml gem community.general.gem: name: hiera-eyaml state: latest - name: vmfloaty gem community.general.gem: name: vmfloaty state: latest - name: Python packages via pip ansible.builtin.pip: state: latest name: - ansible - ansible-lint - flake8 - pywinrm - name: ensure fonts directory file: path: "{{ lookup('env', 'HOME') }}/.fonts" state: directory - name: Hack exists shell: "ls {{ lookup('env', 'HOME') }}/.fonts/Hack*Nerd*Font*Complete*" register: hack_exists ignore_errors: true - name: Download Hack when: hack_exists is failed ansible.builtin.unarchive: src: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip dest: "{{ lookup('env', 'HOME') }}/.fonts/" remote_src: true - name: Setup Oh My ZSH include_role: name: gantsign.oh-my-zsh vars: oh_my_zsh_theme: steeef oh_my_zsh_plugins: - git users: - username: "{{ lookup('env', 'USER') }}" # - name: Symlink .zshrc # ansible.builtin.file: # src: "{{ lookup('env', 'HOME') }}/repos/dots/link/nix/zshrc" # dest: "{{ lookup('env', 'HOME') }}/.zshrc" # state: link # - name: Set shell to zsh and add to groups # become: true # ansible.builtin.user: # name: "{{ lookup('env', 'USER') }}" # shell: /usr/bin/zsh # append: true # groups: # - dialout - name: Add passwordless sudo entries become: true community.general.sudoers: name: "{{ lookup('env', 'USER') }}-no-password" user: "{{ lookup('env', 'USER') }}" nopassword: true commands: - /usr/bin/systemctl restart pcscd - /usr/bin/pkill -9 gpg-agent