- name: ensure packages required for libtaskotron are installed
  action: yum name={{ item }} state=latest
  with_items:
    - PyYAML
    - libtaskotron

- name: ensure packages required for taskotron tasks are installed
  action: yum name={{ item }} state=latest
  with_items:
    - python-solv
    - python-librepo
    - rpmlint

- name: generate taskotron.yaml config file
  template: src=taskotron.yaml.j2 dest=/etc/taskotron/taskotron.yaml owner=root group=root mode=0644

- name: set baseurl of yumrepoinfo.conf
  replace: dest=/etc/taskotron/yumrepoinfo.conf regexp='baseurl = http://download\.fedoraproject\.org/.*' replace='baseurl = http://infrastructure.fedoraproject.org/pub/fedora/linux'

# disabled for now until interaction with hosts role is figured out
#- name: update /etc/hosts so that koji downloads work
#  template: src=hosts.j2 dest=/etc/hosts owner=root group=root mode=0644

- name: create /var/log/taskotron for task logfiles
  file: path=/var/log/taskotron state=directory owner={{ slave_user }} group={{ slave_user }} mode=1755
