---

- name: Add Artifactory Repo
  yum_repository:
    name: bintray--jfrog-artifactory-pro-rpms
    description: bintray--jfrog-artifactory-pro-rpms
    baseurl: https://jfrog.bintray.com/artifactory-pro-rpms
    gpgcheck: no
    enabled: yes

- name: Install Artifactory from RPM
  yum:
    name: "jfrog-artifactory-pro-{{ artifactory_version }}"
    state: installed
    releasever: "{{ artifactory_version }}"
    enablerepo: bintray--jfrog-artifactory-pro-rpms
    disablerepo: "epel,amzn-main,amzn-updates"
  notify: Enable Artifactory
