- name: epel 8
  become: true
  dnf:
    name: epel-release
  when: ansible_distribution != 'Fedora'
- name: fish yum repo
  become: true
  yum_repository:
    name: fish
    description: fish
    baseurl: 'https://download.opensuse.org/repositories/shells:/fish:/release:/3/CentOS_8/'
    ip_resolve: 'IPv4'
    gpgkey: 'https://download.opensuse.org/repositories/shells:/fish:/release:/3/CentOS_8/repodata/repomd.xml.key'
  when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8
- name: dnf
  become: true
  dnf:
    name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,python3-devel,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged,nfs-utils,ipset,fish,wireguard-tools,zstd # nfs-common,fish
    update_cache: yes
- name: Fedora packages
  become: true
  dnf:
    name: fish,wireguard-tools
  when: ansible_distribution == 'Fedora'
- name: open-vm-tools
  become: true
  dnf:
    name: open-vm-tools
    state: '{{vm_agents_status}}'
  when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "VMware"
- name: qemu-guest-agent
  become: true
  dnf:
    name: qemu-guest-agent
    state: '{{vm_agents_status}}'
  when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm"
- name: dnf autoremove
  become: true
  dnf:
    autoremove: true
