- name: Install needed RPMs for running tempest
  become: true
  become_method: sudo
  yum:
    name="{{ item }}"
    state=present
  with_items:
    - 'libffi-devel'
    - 'openssl-devel'
    - 'subunit-filters'

- include: "{{ tempest_install_type }}.yml"

- name: Deploy tempest configuration script
  template:
    src=setup_tempest.j2
    dest='tempest/setup_tempest.sh'
    mode=0755

- name: Configure tempest
  shell: >
    source {{ rc_file | default(overcloud_rc_file) }};
    tempest/venv ./setup_tempest.sh
  args:
    creates: "~/tempest/etc/tempest.conf"

# If no skipfile is present, tempest will fail to run
- name: Create empty skip file
  file:
    path='tempest/skipfile'
    state=touch
    mode=0555

- name: create skip list - Whitelist
  lineinfile:
    create: yes
    dest: "{{ tempest_skipfile | default(overcloud_skipfile) }}"
    line: "+{{ item }}"
    regexp: "^[-+]{{ item }}$"
  with_items: tempest.whitelist
  when: tempest.whitelist is defined

- name: create skip list - Blacklist
  lineinfile:
    create: yes
    dest: "{{ tempest_skipfile | default(overcloud_skipfile) }}"
    line: "-{{ item }}"
    regexp: "^[-+]{{ item }}$"
  with_items: tempest.blacklist
  when: tempest.blacklist is defined

- name: Install needed RPMs for running tempest
  become: true
  become_method: sudo
  yum:
    name="{{ item }}"
    state=present
  with_items:
    - 'gcc'
    - 'libffi-devel'
    - 'openssl-devel'
    - 'subunit-filters'

- include: "{{ tempest_install_type }}.yml"

- name: Deploy tempest configuration script
  template:
    src=setup_tempest.j2
    dest='tempest/setup_tempest.sh'
    mode=0755

- name: Configure tempest
  shell: >
    source {{ rc_file | default(overcloud_rc_file) }};
    tempest/venv ./setup_tempest.sh
  args:
    creates: "~/tempest/etc/tempest.conf"

# If no skipfile is present, tempest will fail to run
- name: Create empty skip file
  file:
    path='tempest/skipfile'
    state=touch
    mode=0555

- name: create skip list - Whitelist
  lineinfile:
    create: yes
    dest: "{{ tempest_skipfile | default(overcloud_skipfile) }}"
    line: "+{{ item }}"
    regexp: "^[-+]{{ item }}$"
  with_items: tempest.whitelist
  when: tempest.whitelist is defined

- name: create skip list - Blacklist
  lineinfile:
    create: yes
    dest: "{{ tempest_skipfile | default(overcloud_skipfile) }}"
    line: "-{{ item }}"
    regexp: "^[-+]{{ item }}$"
  with_items: tempest.blacklist
  when: tempest.blacklist is defined

Add gcc to tempest dependencies
Add gcc to tempest dependencies

You need it to run virtualenv.

Change-Id: I355a5122ef8d306762576850804d2dcae722695d
