--- - name: Gather installed package facts tags: [packages] ansible.builtin.package_facts: manager: auto - name: Copy Fedora dotfiles tags: [dotfiles, dotfiles:common] ansible.builtin.copy: src: "{{ playbook_dir }}/../dotfiles/fedora/{{ item.src }}" dest: "{{ effective_user_home }}/{{ item.dest }}" owner: "{{ effective_username }}" group: "{{ effective_user_group }}" mode: "{{ item.mode }}" loop: "{{ fedora_dotfiles | default([]) }}" loop_control: label: "{{ item.dest }}" - name: Configure Docker repository on Fedora tags: [packages] ansible.builtin.yum_repository: name: docker-ce-stable description: Docker CE Stable - $basearch baseurl: "https://download.docker.com/linux/fedora/$releasever/$basearch/stable" enabled: true gpgcheck: true gpgkey: https://download.docker.com/linux/fedora/gpg state: present when: - "'workstation_dev_fedora' in group_names" - fedora_manage_docker_repo | default(false) - name: Configure Google Chrome repository on Fedora tags: [packages] ansible.builtin.yum_repository: name: google-chrome description: Google Chrome baseurl: "https://dl.google.com/linux/chrome/rpm/stable/$basearch" enabled: true gpgcheck: true gpgkey: https://dl.google.com/linux/linux_signing_key.pub state: present when: - workstation_manage_google_chrome | default(false) - fedora_manage_google_chrome_repo | default(false) - name: Configure Visual Studio Code repository on Fedora tags: [packages, vscode] ansible.builtin.yum_repository: name: vscode description: Visual Studio Code baseurl: https://packages.microsoft.com/yumrepos/vscode enabled: true gpgcheck: true gpgkey: https://packages.microsoft.com/keys/microsoft.asc state: present when: - "'workstation_host_linux' in group_names" - fedora_manage_vscode_repo | default(false) - name: Configure IntelliJ IDEA COPR repository on Fedora tags: [packages] ansible.builtin.get_url: url: >- https://copr.fedorainfracloud.org/coprs/{{ fedora_intellij_copr_owner }}/{{ fedora_intellij_copr_project }}/repo/fedora-{{ ansible_facts['distribution_major_version'] }}/{{ fedora_intellij_copr_owner }}-{{ fedora_intellij_copr_project }}-fedora-{{ ansible_facts['distribution_major_version'] }}.repo dest: /etc/yum.repos.d/{{ fedora_intellij_copr_owner }}-{{ fedora_intellij_copr_project }}-fedora-{{ ansible_facts['distribution_major_version'] }}.repo owner: root group: root mode: "0644" when: - "'workstation_host_linux' in group_names" - fedora_manage_intellij_repo | default(false) - name: Refresh dnf package metadata tags: [packages] ansible.builtin.dnf: update_cache: true - name: Install packages on Fedora tags: [packages] ansible.builtin.dnf: name: >- {{ ( (common_packages | default([])) + (fedora_packages_base | default([])) + ( (fedora_docker_packages | default([])) if 'workstation_dev_fedora' in group_names else [] ) + ( ['google-chrome-stable'] if workstation_manage_google_chrome | default(false) else [] ) + (profile_packages | default([])) + ( (fedora_desktop_packages | default([])) if 'graphical_desktop' in group_names else [] ) + ( (fedora_workstation_dev_packages | default(workstation_dev_packages | default([]))) if 'workstation_dev_fedora' in group_names else [] ) + ( (workstation_host_linux_packages_fedora | default(workstation_host_linux_packages | default([]))) if 'workstation_host_linux' in group_names else [] ) + ( [fedora_intellij_package_name] if ( 'workstation_host_linux' in group_names and fedora_manage_intellij_repo | default(false) ) else [] ) + (host_packages | default([])) ) | unique }} state: present - name: Add user to docker group tags: [packages] ansible.builtin.user: name: "{{ effective_username }}" groups: docker append: true when: - "'workstation_dev_fedora' in group_names" - (fedora_docker_packages | default([])) | length > 0 - name: Install Fedora npm packages tags: [packages, npm, ai_agents] community.general.npm: name: "{{ item.name }}" global: true state: "{{ item.state | default('present') }}" loop: "{{ fedora_npm_packages | default([]) }}" when: (fedora_npm_packages | default([])) | length > 0 loop_control: label: "{{ item.name }}" - name: Define Fedora Flatpak applications tags: [packages] ansible.builtin.set_fact: packages_fedora_flatpak_packages: >- {{ ( (fedora_flatpak_packages | default([])) + (host_flatpak_packages | default([])) + ( (workstation_flatpak_packages | default([])) if 'workstation_host_linux' in group_names else [] ) ) | unique }} - name: Ensure Flathub remote is configured on Fedora tags: [packages] community.general.flatpak_remote: name: "{{ fedora_flatpak_remote_name | default('flathub') }}" state: present flatpakrepo_url: "{{ fedora_flatpak_remote_url | default('https://dl.flathub.org/repo/flathub.flatpakrepo') }}" when: (packages_fedora_flatpak_packages | default([])) | length > 0 - name: Install Fedora Flatpak applications tags: [packages] community.general.flatpak: name: "{{ packages_fedora_flatpak_packages }}" state: present remote: "{{ fedora_flatpak_remote_name | default('flathub') }}" method: system when: (packages_fedora_flatpak_packages | default([])) | length > 0