-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: alloy installation via repository + suse support
- Loading branch information
Showing
10 changed files
with
190 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
--- | ||
- name: APT - Install Alloy | ||
- name: APT - Install from Remote URL | ||
ansible.builtin.apt: | ||
deb: "{{ alloy_download_url_deb }}" | ||
state: present | ||
notify: restart alloy | ||
when: __current_deployed_version.stdout is not defined or alloy_version not in __current_deployed_version.stdout | ||
when: (__current_deployed_version.stdout is not defined or alloy_version not in __current_deployed_version.stdout) and alloy_install_type == "url" | ||
|
||
- name: Import apt repository key | ||
ansible.builtin.get_url: | ||
url: "{{ alloy_apt_signing_key_url }}" | ||
dest: "/etc/apt/trusted.gpg.d/grafana.asc" | ||
mode: '0644' | ||
force: true | ||
when: alloy_install_type == "repository" | ||
|
||
- name: Add grafana repository to sources list | ||
ansible.builtin.apt_repository: | ||
repo: "{{ alloy_apt_repo }}" | ||
state: present | ||
filename: grafana | ||
when: alloy_install_type == "repository" | ||
|
||
- name: APT - Install Alloy from Repository | ||
ansible.builtin.apt: | ||
name: alloy | ||
state: latest | ||
update_cache: yes | ||
notify: restart alloy | ||
when: alloy_install_type == "repository" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
- name: ZYPPER - Install Alloy from remote URL | ||
ansible.builtin.zypper: | ||
name: "{{ alloy_download_url_rpm }}" | ||
state: present | ||
disable_gpg_check: true | ||
notify: restart alloy | ||
when: (__current_deployed_version.stdout is not defined or alloy_version not in __current_deployed_version.stdout) and alloy_install_type == "url" | ||
|
||
- name: Install required packages for repository installation | ||
ansible.builtin.package: | ||
name: "{{ item }}" | ||
state: present | ||
loop: "{{ __alloy_required_packages }}" | ||
when: alloy_install_type == "repository" | ||
|
||
- name: Import grafana signing key | ||
ansible.builtin.rpm_key: | ||
state: present | ||
key: "{{ alloy_rpm_signing_key_url }}" | ||
when: alloy_install_type == "repository" | ||
|
||
- name: Add grafana zypper repository | ||
community.general.zypper_repository: | ||
name: grafana | ||
repo: "{{ alloy_rpm_repo_url }}" | ||
state: present | ||
when: alloy_install_type == "repository" | ||
|
||
- name: ZYPPER - Install Alloy from Repository | ||
community.general.zypper: | ||
name: alloy | ||
state: present | ||
update_cache: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
--- | ||
__alloy_env_file: "/etc/sysconfig/alloy" | ||
__alloy_required_packages: | ||
- gpg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
__alloy_env_file: "/etc/sysconfig/alloy" | ||
__alloy_required_packages: | ||
- gpg2 |