Skip to content
Snippets Groups Projects
Commit cea3b9e9 authored by Alexander Käb's avatar Alexander Käb
Browse files

Change to direct rpm install instead of rpm repository

parent 58b9d1a0
Branches
No related tags found
No related merge requests found
graylog_sidecar_node_id: 'file:/etc/machine-id' graylog_sidecar_node_id: 'file:/etc/machine-id'
sidecar_repo_urls: sidecar_repo_urls:
"RedHat": "https://packages.graylog2.org/repo/packages/graylog-sidecar-repository-1-5.noarch.rpm" "RedHat": "https://github.com/Graylog2/collector-sidecar/releases/download/1.4.0/graylog-sidecar-1.4.0-1.x86_64.rpm"
"Debian": "https://packages.graylog2.org/repo/packages/graylog-sidecar-repository_1-5_all.deb" "Debian": "https://github.com/Graylog2/collector-sidecar/releases/download/1.4.0/graylog-sidecar_1.4.0-1_amd64.deb"
sidecar_checksum: https://github.com/Graylog2/collector-sidecar/releases/download/1.4.0/CHECKSUMS-SHA256.txt
install_filebeat: true install_filebeat: true
filebeat_repo_urls: filebeat_repo_urls:
......
...@@ -5,20 +5,21 @@ ...@@ -5,20 +5,21 @@
- name: Download repository file (Debian | Ubuntu) - name: Download repository file (Debian | Ubuntu)
ansible.builtin.get_url: ansible.builtin.get_url:
url: "{{ sidecar_repo_urls['Debian'] }}" url: "{{ sidecar_repo_urls['Debian'] }}"
dest: /tmp/graylog-sidecar-repository.deb checksum: "sha256:{{ sidecar_checksum }}"
dest: /tmp/graylog-sidecar.deb
mode: 0644 mode: 0644
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true
- name: Copy DEB to nodes (Debian | Ubuntu) - name: Copy DEB to nodes (Debian | Ubuntu)
ansible.builtin.copy: ansible.builtin.copy:
src: /tmp/graylog-sidecar-repository.deb src: /tmp/graylog-sidecar.deb
dest: /tmp/graylog-sidecar-repository.deb dest: /tmp/graylog-sidecar.deb
mode: 0644 mode: 0644
- name: Add repository using dpkg (Debian | Ubuntu) - name: Add repository using dpkg (Debian | Ubuntu)
ansible.builtin.command: ansible.builtin.command:
cmd: dpkg -i /tmp/graylog-sidecar-repository.deb cmd: dpkg -i /tmp/graylog-sidecar.deb
changed_when: false changed_when: false
- name: Add sidecar repo (RedHat) - name: Add sidecar repo (RedHat)
...@@ -28,28 +29,22 @@ ...@@ -28,28 +29,22 @@
- name: Download rpm file (RedHat) - name: Download rpm file (RedHat)
ansible.builtin.get_url: ansible.builtin.get_url:
url: "{{ sidecar_repo_urls['RedHat'] }}" url: "{{ sidecar_repo_urls['RedHat'] }}"
dest: /tmp/graylog-sidecar-repository.rpm checksum: "sha256:{{ sidecar_checksum }}"
dest: /tmp/graylog-sidecar.rpm
mode: 0644 mode: 0644
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true
- name: Copy RPM to nodes (RedHat) - name: Copy RPM to nodes (RedHat)
ansible.builtin.copy: ansible.builtin.copy:
src: /tmp/graylog-sidecar-repository.rpm src: /tmp/graylog-sidecar.rpm
dest: /tmp/graylog-sidecar-repository.rpm dest: /tmp/graylog-sidecar.rpm
mode: 0644 mode: 0644
- name: Install rpm (RedHat) - name: Install rpm (RedHat)
ansible.builtin.yum: ansible.builtin.yum:
name: /tmp/graylog-sidecar-repository.rpm name: /tmp/graylog-sidecar.rpm
state: present state: present
disable_gpg_check: true # Here, we are installing the package that contains the gpg key
- name: Install sidecar package
ansible.builtin.package:
name: graylog-sidecar
state: present
become: true
- name: Run install command - name: Run install command
ansible.builtin.command: ansible.builtin.command:
...@@ -72,4 +67,4 @@ ...@@ -72,4 +67,4 @@
name: graylog-sidecar name: graylog-sidecar
state: started state: started
enabled: true enabled: true
become: true become: true
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment