From e0ece816293ed2745a291c064b8694cd69c6f840 Mon Sep 17 00:00:00 2001 From: Julian Gethmann Date: Tue, 15 Aug 2017 17:40:05 +0200 Subject: [PATCH] Add ripgrep --- hosts | 5 +++++ ripgrep.yml | 3 +++ roles/ripgrep/tasks/main.yml | 38 ++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 ripgrep.yml create mode 100644 roles/ripgrep/tasks/main.yml diff --git a/hosts b/hosts index f680da3..959cdab 100644 --- a/hosts +++ b/hosts @@ -87,6 +87,11 @@ las120.las.kit.edu las126.las.kit.edu las-gethmann.las.kit.edu +[ripgrep] +las113.las.kit.edu +las-gethmann.las.kit.edu +las101.las.kit.edu + # semi stable [local] # 127.0.0.1 ansible_connection=local diff --git a/ripgrep.yml b/ripgrep.yml new file mode 100644 index 0000000..b87bd66 --- /dev/null +++ b/ripgrep.yml @@ -0,0 +1,3 @@ +- hosts: ripgrep + roles: + - ripgrep diff --git a/roles/ripgrep/tasks/main.yml b/roles/ripgrep/tasks/main.yml new file mode 100644 index 0000000..b961f03 --- /dev/null +++ b/roles/ripgrep/tasks/main.yml @@ -0,0 +1,38 @@ +--- + +# 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 + + # This needs to be done: TODO + # - 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 -- GitLab