# This file handles everything related to packaging.

- name: Print summary of all the repositories enabled on the host
  shell: "{{ yum_bin }} repolist all"

- name: Install test dependencies RPMs needed to run the tests
  become: yes
  become_method: sudo
  yum: pkg="{{ item }}" state=latest
  with_items: "{{ component_config.setup.install }}"
  when: "{{ component_config.setup.install }}"

- name: Remove unwanted rpms
  become: yes
  become_method: sudo
  yum: pkg="{{ item }}" state=absent
  with_items: "{{ component_config.setup.remove }}"
  when: "{{ component_config.setup.remove }}"

- name: Install packages needed for converting and collecting the logs
  become: yes
  become_method: sudo
  yum: name="{{ logs_packages }}" state=present

# This file handles everything related to packaging.

- name: Print summary of all the repositories enabled on the host
  shell: "{{ yum_bin }} repolist all"

- name: Install test dependencies RPMs needed to run the tests
  become: yes
  become_method: sudo
  yum: pkg="{{ item }}" state=latest
  with_items: "{{ component_config.setup.install | default([]) }}"
  when: component_config.setup | default(false) and component_config.setup.install | default(false)

- name: Remove unwanted rpms
  become: yes
  become_method: sudo
  yum: pkg="{{ item }}" state=absent
  with_items: "{{ component_config.setup.remove | default([]) }}"
  when: component_config.setup | default(false) and component_config.setup.remove | default(false)

- name: Install packages needed for converting and collecting the logs
  become: yes
  become_method: sudo
  yum: name="{{ logs_packages }}" state=present

Correct skip logic in install_packages
Correct skip logic in install_packages

[DEPRECATION WARNING]: Skipping task due to undefined attribute,
in the future this will be a fatal error..

according to https://github.com/ansible/ansible/issues/13274
the correct behavior is to include | default([]) on with_items if
may not be defined

Change-Id: I070de78e1d8e01274a62b2400f2b675c5e26382b
