---
- name: Add packagecloud GPG key.
  rpm_key:
    key: "{{ blackfire_gpg_key_url }}"
    state: present

- name: Add Blackfire repository.
  get_url:
    url: http://packages.blackfire.io/fedora/blackfire.repo
    dest: /etc/yum.repos.d/blackfire.repo
    mode: 0644

- name: Disable gpg_repocheck for non-bleeding-edge CentOS.
  lineinfile: >
    dest=/etc/yum.repos.d/blackfire.repo
    regexp="^repo_gpgcheck="
    line="repo_gpgcheck=0"
    state=present
