main.yml 1.39 KB
Newer Older
julian.gethmann's avatar
julian.gethmann committed
1
2
3
4
5
6
7
---

# 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
8
9
  args:
    warn: False
julian.gethmann's avatar
julian.gethmann committed
10
  changed_when: false
11
  when: (ansible_distribution == "Fedora" and (ansible_distribution_major_version|int) >= 24 and (ansible_distribution_major_version|int) < 28)
julian.gethmann's avatar
julian.gethmann committed
12
13
14
15
16
17
18
  tags: ripgrep

- name: install ripgrep
  become: yes
  dnf:
    name: ripgrep
    state: present
julian.gethmann's avatar
julian.gethmann committed
19
  when: (ansible_distribution == "Fedora" and (ansible_distribution_major_version|int) >= 24)
julian.gethmann's avatar
julian.gethmann committed
20
21
  tags: ripgrep

22
  # This needs to be done: TODO CentOS 7
julian.gethmann's avatar
julian.gethmann committed
23
24
25
26
27
28
29
30
  # - 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
julian.gethmann's avatar
julian.gethmann committed
31
  #  when: (ansible_distribution == "CentOS" and (ansible_distribution_major_version|int) == 7)
julian.gethmann's avatar
julian.gethmann committed
32
33
34
35
36
37
38
  #  tags: ripgrep
  #
  # - name: install ripgrep
  #   become: yes
  #   yum:
  #     name: ripgrep
  #     state: present
julian.gethmann's avatar
julian.gethmann committed
39
  #  when: (ansible_distribution == "CentOS" and (ansible_distribution_major_version|int) == 7)
julian.gethmann's avatar
julian.gethmann committed
40
  #  tags: ripgrep