- name: Install packages for desktop environment become: yes apt: state: latest name: - sway - xwayland - swaylock - waybar - xfce4-appfinder - pipewire - pipewire-pulse - alsa-utils - brightnessctl - flatpak - thunar - adwaita-icon-theme - fonts-firacode - fonts-font-awesome - fonts-noto-color-emoji - name: Add flathub remote to flatpak community.general.flatpak_remote: name: flathub state: present flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo method: user - name: Install flatpaks community.general.flatpak: name: "{{ item }}" state: present method: user loop: - org.wezfurlong.wezterm - name: Create group for sudoers config group: name: admins state: present - name: Add user to group for sudoers config user: append: true name: "{{ ansible_user_id }}" groups: - admins - name: Create sudoers config become: yes community.general.sudoers: name: desktop-environment group: admins nopassword: true commands: - "/usr/bin/systemctl poweroff" - "/usr/bin/systemctl reboot" - "/usr/bin/systemctl suspend" - name: Copy static config files copy: src: "{{ item.src }}" dest: "{{ item.dest }}" loop: - src: "{{ role_path }}/files/.config" dest: "{{ ansible_env.HOME }}/.config" - name: Render config files ansible.builtin.template: src: "{{ item.src }}" dest: "{{ item.dest }}" loop: - src: "bash_profile.j2" dest: "{{ ansible_env.HOME }}/.bash_profile" - src: "sway-config.j2" dest: "{{ ansible_env.HOME }}/.config/sway/config" - src: "waybar-config.j2" dest: "{{ ansible_env.HOME }}/.config/waybar/config"