-
Notifications
You must be signed in to change notification settings - Fork 59
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
Replace the rest of the hardcoded references to amd64 with {{ go_arch }} #23
Conversation
This should match how the binaries are downloaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to remove {{ go_arch }}
from the binary itself ?
@@ -54,23 +54,23 @@ | |||
|
|||
- name: Check promtail binary | |||
stat: | |||
path: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-amd64" | |||
path: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-{{ go_arch }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to shorten the path to
path: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-{{ go_arch }}" | |
path: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail" |
dest: "{{ promtail_install_dir }}/{{ promtail_version }}" | ||
creates: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-amd64" | ||
creates: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-{{ go_arch }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creates: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-{{ go_arch }}" | |
creates: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail" |
@@ -79,7 +79,7 @@ | |||
ignore_errors: "{{ ansible_check_mode }}" | |||
file: | |||
state: link | |||
src: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-amd64" | |||
src: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-{{ go_arch }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail-linux-{{ go_arch }}" | |
src: "{{ promtail_install_dir }}/{{ promtail_version }}/promtail" |
@mkeesey Let me know and I merge the PR and create a new release :-) |
No problem at all! Thanks for taking a look. I think a lot of the necessity of the architecture-specific name comes down to the unzip process - the Grafana folks package the binary within the zip itself with OS and architecture specific names. Annoyingly, I haven't found a reasonable way to transform the filenames within the zip as they are extracted from I'm definitely ok with playing around with it some more if you want to iterate on the design a bit. 👍 |
Thanks for your explanation 👍
Agreed - I'll merge the PR and create a new release. Thank you very much for your efforts |
Thank you for writing this role - it saved me a bunch of time writing my own.
I've updated the install tasks to use
{{ go_arch}}
instead of amd64 directly. This should match how the binaries are downloaded - I followed the pattern used in #22.I have a pi and an old debian-running macbook I ran this updated version against and it appears to successfully install and run promtail on both of the hosts.