main.yml 1.29 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
---

# There is no good solution as far as I know, but a question on stackoverflow:
# https://stackoverflow.com/questions/42651026/ansible-dnf-module-enable-fedora-copr-repository
- name: activate copr
  become: yes
  command: dnf copr enable -y carlwgeorge/ripgrep
  changed_when: false
  when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= 24)
  tags: ripgrep

- name: install ripgrep
  become: yes
  dnf:
    name: ripgrep
    state: present
  when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= 24)
  tags: ripgrep

20
  # This needs to be done: TODO CentOS 7
julian.gethmann's avatar
julian.gethmann committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
  # - name: activate copr
  #   become: yes
  #   yum_repository:
  #     name: copr
  #     https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo
  #     state: present
  #     enabled: yes
  #  yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo
  #  when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == 7)
  #  tags: ripgrep
  #
  # - name: install ripgrep
  #   become: yes
  #   yum:
  #     name: ripgrep
  #     state: present
  #  when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == 7)
  #  tags: ripgrep