# Tasks required to have Koha QA Tools working for the vagrant user
- name: Install Koha QA tools (dependencies)
  sudo_user: root
  apt: pkg={{ item }} state=latest
  with_items:
    - libfile-chdir-perl
    - libgit-repository-perl
    - liblist-compare-perl
    - libmoo-perl
    - libperl-critic-perl
    - libtest-perl-critic-perl
    - libtest-perl-critic-progressive-perl
    - libsmart-comments-perl

- name: Install Koha QA tools (not in wheezy)
  sudo_user: root
  apt: pkg={{ item }} state=latest
  with_items:
    - codespell
  when: ansible_distribution_release != 'wheezy'

- name: Install testing dependencies (cpanm)
  sudo_user: root
  cpanm: name={{ item }}
  with_items:
    - HTTPD::Bench::ApacheBench
    - Test::DBIx::Class

- name: Clone Koha QA tools
  sudo_user: vagrant
  git: repo={{ koha_qa_repo }}  dest={{ koha_qa_dir }} version={{ koha_qa_version }} accept_hostkey=yes

- name: Set perlcritic for the vagrant user
  file: src={{ koha_qa_dir }}/perlcriticrc dest={{ vagrant_home_dir }}/.perlcriticrc state=link
# Tasks required to have Koha QA Tools working for the vagrant user
- name: Install Koha QA tools (dependencies)
  sudo_user: root
  apt: pkg={{ item }} state=latest
  with_items:
    - libfile-chdir-perl
    - libgit-repository-perl
    - liblist-compare-perl
    - libmoo-perl
    - libperl-critic-perl
    - libtest-perl-critic-perl
    - libtest-perl-critic-progressive-perl
    - libsmart-comments-perl
    - libdatetimex-easy-perl

- name: Install Koha QA tools (not in wheezy)
  sudo_user: root
  apt: pkg={{ item }} state=latest
  with_items:
    - codespell
  when: ansible_distribution_release != 'wheezy'

- name: Install testing dependencies (cpanm)
  sudo_user: root
  cpanm: name={{ item }}
  with_items:
    - HTTPD::Bench::ApacheBench
    - Test::DBIx::Class

- name: Clone Koha QA tools
  sudo_user: vagrant
  git: repo={{ koha_qa_repo }}  dest={{ koha_qa_dir }} version={{ koha_qa_version }} accept_hostkey=yes

- name: Set perlcritic for the vagrant user
  file: src={{ koha_qa_dir }}/perlcriticrc dest={{ vagrant_home_dir }}/.perlcriticrc state=link
Add missing dep for newer Test::DBIx::Class
Add missing dep for newer Test::DBIx::Class

Signed-off-by: Tomas Cohen Arazi <63ac9f6777fb741d62c33cd73a438a8ce82c7d4a@unc.edu.ar>
