- name: Install Ansible Python 2 Dependencies
  package:
    name: "{{ item }}"
    state: present
  with_items:
    - python-firewall
    - libselinux-python
    - libsemanage-python
    - wireless-tools

- name: Google Chrome repository
  copy:
    src: google-chrome.repo
    dest: /etc/yum.repos.d/google-chrome.repo
    owner: root
    group: root
    mode: 0644

- name: Paper Gnome Theme repository
  copy:
    src: home_snwh_paper.repo
    dest: /etc/yum.repos.d/home_snwh_paper.repo
    owner: root
    group: root
    mode: 0644

- name: Development Environment
  package:
    name: "{{ item }}"
    state: present
  with_items:
    - nodejs
    - jq
    - kubernetes-client
    - google-chrome-beta
    - gnome-tweak-tool
    - paper-icon-theme
    - paper-gtk-theme
    - xorg-x11-utils
    - akmod-VirtualBox
    - VirtualBox

- name: Remove PackageKit
  package:
    name: "{{ item }}"
    state: absent
  with_items:
    - PackageKit

- name: Install Ansible Python 2 Dependencies
  package:
    name: "{{ item }}"
    state: present
  with_items:
    - python-firewall
    - libselinux-python
    - libsemanage-python
    - wireless-tools

- name: Google Chrome repository
  copy:
    src: google-chrome.repo
    dest: /etc/yum.repos.d/google-chrome.repo
    owner: root
    group: root
    mode: 0644

- name: Paper Gnome Theme repository
  copy:
    src: home_snwh_paper.repo
    dest: /etc/yum.repos.d/home_snwh_paper.repo
    owner: root
    group: root
    mode: 0644

- name: Update Package List
  command: dnf --refresh check-update
  args:
    warn: no
  register: updates_available
  failed_when: (updates_available.rc != 0) and
               (updates_available.rc != 100)
  changed_when: false
  
- name: Development Environment
  package:
    name: "{{ item }}"
    state: present
  with_items:
    - nodejs
    - jq
    - kubernetes-client
    - google-chrome-beta
    - gnome-tweak-tool
    - paper-icon-theme
    - paper-gtk-theme
    - xorg-x11-utils
    - akmod-VirtualBox
    - VirtualBox

- name: Remove PackageKit
  package:
    name: "{{ item }}"
    state: absent
  with_items:
    - PackageKit

Fix order of operations issue.
Fix order of operations issue.
