- name: Install iiab-extra repos
  template:
    backup: no
    dest: /etc/yum.repos.d/iiab-extra.repo
    src: iiab-extra.repo
    owner: root
    group: root
    mode: 0666

- name: Install iiab-testing repos
  template:
    backup: no
    dest: /etc/yum.repos.d/iiab-testing.repo
    src: iiab-testing.repo
    owner: root
    group: root
    mode: 0666

- name: Get the createrepo program
  package:
    name: createrepo
    state: present

- name: Install local repo file
  template:
    dest: /etc/yum.repos.d/iiab-local.repo
    src: local.repo
    owner: root
    group: root
    mode: 0644

- name: Create local repo
  shell: createrepo {{ yum_packages_dir }}
