Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alloy: Restart the service when version is changed #233

Open
f9n opened this issue Jul 1, 2024 · 1 comment
Open

alloy: Restart the service when version is changed #233

f9n opened this issue Jul 1, 2024 · 1 comment

Comments

@f9n
Copy link

f9n commented Jul 1, 2024

When we change the version (1.0.0 -> 1.2.0), role does not restart the alloy service. Is this normal? Or can we support restarting when version changes?

# roles/alloy/tasks/install.yml
...
- name: Download alloy binary
  ansible.builtin.get_url:
    url: "{{ binary_url }}"
    dest: "/tmp/alloy-{{ version }}.zip"
    mode: '0755'
  become: true

- name: Extract alloy binary
  ansible.builtin.unarchive:
    src: "/tmp/alloy-{{ version }}.zip"
    dest: "/tmp"
    remote_src: yes
  become: true

- name: Copy installed binary to installation dir
  ansible.builtin.copy:
    src: "/tmp/alloy-linux-{{ arch }}"
    dest: "{{ installation_dir }}/alloy-linux-{{ arch }}"
    mode: '0755'
    remote_src: yes
  become: true
  notify: Restart alloy

If it is convenient for you, we can create a pull request for the above changes.
cc: @emre-23 @acciorg

@ishanjainn
Copy link
Member

Yeah, Ideally Alloy should be restarted when we have a version change.

Lemme know if you wanna fix this in a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants