diff --git a/roles/telegraf/tasks/centos.yml b/roles/telegraf/tasks/centos.yml index 8f8e320..6b846da 100644 --- a/roles/telegraf/tasks/centos.yml +++ b/roles/telegraf/tasks/centos.yml @@ -1,3 +1,15 @@ +- name: "copy influxdb.repo" + copy: + backup: yes + src: "{{ playbook_dir }}/repo/influxdb.repo" + dest: /etc/yum.repos.d/influxdb.repo + owner: root + group: root + mode: '0644' + +- name: download repo + shell: sed -i "s/\$releasever/$(rpm -E %{rhel})/g" /etc/yum.repos.d/influxdb.repo + - name: Update cache and install a list of COMMON packages with a list variable ansible.builtin.yum: name: "{{ packages }}"