--- - name: Install packages hosts: localhost connection: local become: false tasks: - name: Install apt packages become: true ansible.builtin.apt: autoclean: true autoremove: true install_recommends: true pkg: - ansible - curl - fcitx5 - foot - git - grimshot - lxpolkit - network-manager-gnome - nextcloud-desktop - npm - pass - pipx - plocate - python3-yamlfix - scdaemon - sway - sway-backgrounds - sway-notification-center - swayidle - swaylock - thunar - thunderbird - unzip - waybar - 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