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

Change to download the repository file to localhost first

parent 289fb6c8
No related branches found
No related tags found
No related merge requests found
...@@ -12,24 +12,48 @@ ...@@ -12,24 +12,48 @@
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
become: true become: true
block: block:
- name: Download repository file - 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 dest: /tmp/graylog-sidecar-repository.deb
mode: 0644 mode: 0644
delegate_to: localhost
run_once: true
- name: Add repository using dpkg - name: Copy DEB to nodes (Debian | Ubuntu)
ansible.builtin.copy:
src: /tmp/graylog-sidecar-repository.deb
dest: /tmp/graylog-sidecar-repository.deb
mode: 0644
- 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-repository.deb
changed_when: false changed_when: false
- name: Add sidecar repo (RedHat) - name: Add sidecar repo (RedHat)
ansible.builtin.yum:
name: "{{ sidecar_repo_urls['RedHat'] }}"
state: present
disable_gpg_check: true # Here, we are installing the package that contains the gpg key
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
become: true become: true
block:
- name: Download rpm file (RedHat)
ansible.builtin.get_url:
url: "{{ sidecar_repo_urls['RedHat'] }}"
dest: /tmp/graylog-sidecar-repository.rpm
mode: 0644
delegate_to: localhost
run_once: true
- name: Copy RPM to nodes (RedHat)
ansible.builtin.copy:
src: /tmp/graylog-sidecar-repository.rpm
dest: /tmp/graylog-sidecar-repository.rpm
mode: 0644
- name: Install rpm (RedHat)
ansible.builtin.yum:
name: /tmp/graylog-sidecar-repository.rpm
state: present
disable_gpg_check: true # Here, we are installing the package that contains the gpg key
- name: Install sidecar package - name: Install sidecar package
ansible.builtin.package: ansible.builtin.package:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment