--- - name: Install packages hosts: localhost connection: local become: false vars: uid: "{{ lookup('env','USER') }}" tasks: - name: Install apt packages become: true ansible.builtin.apt: autoclean: true autoremove: true install_recommends: true pkg: - ansible - curl - dia - fcitx5 - foot - git - grimshot - lxpolkit - network-manager-gnome - nextcloud-desktop - npm - pass - pavucontrol - pipewire-audio - pipx - plocate - python3-yamlfix - scdaemon - sway - sway-backgrounds - sway-notification-center - swayidle - swaylock - thunar - thunderbird - unzip - waybar - wdisplays - wget - wl-clipboard - wofi - xdg-desktop-portal - xdg-desktop-portal-wlr - yq - zsh state: latest update_cache: true - name: Remove apt packages become: true ansible.builtin.apt: autoclean: true autoremove: true install_recommends: true pkg: [nano] state: absent update_cache: true - name: Enable pipewire-audio ansible.builtin.command: cmd: systemctl --user enable --now pipewire-pulse creates: /home/{{ uid }}/.config/systemd/user/default.target.wants/pipewire-pulse.service