-
Notifications
You must be signed in to change notification settings - Fork 99
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
consul*/install.sls refactoring #38
base: master
Are you sure you want to change the base?
Conversation
Work on Travis issue. |
Ready to merge. I remove gpg package dependency (remove gpg uninstall package managers too on Ubuntu/Centos). |
Hey @nledez, nice enhancement here. I've added a couple comments regarding areas where you could use some salt modules instead of calling commands directly and places where you could do a cleanup. |
@jeduardo are you happy with merging this? |
Hi @jeduardo, I'm happy if I can improve this formulas :) |
consul_template: | ||
{{ consul_template | yaml }} | ||
|
||
import key: |
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.
consul: | ||
{{ consul | yaml }} | ||
|
||
import key: |
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.
@nledez same comment here regarding importing the GPG using using a salt state instead of running a command directly
/opt/consul/{{ version }}/bin: | ||
archive.extracted: | ||
- source: https://releases.hashicorp.com/consul/{{ version }}/consul_{{ version }}_linux_amd64.zip | ||
- source_hash: /opt/consul/{{ version }}/consul_{{ version }}_SHA256SUMS |
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.
@nledez I don't think we need to keep the checksums file around in the filesystem after we use them. You could point it to the upstream directly. However I assume you are explicitly downloading them to enforce the GPG check, right?
|
||
verify shasums sig: | ||
cmd.run: | ||
- name: gpg --verify /opt/consul-template/{{ version }}/consul-template_{{ version }}_SHA256SUMS.sig /opt/consul-template/{{ version }}/consul-template_{{ version }}_SHA256SUMS |
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.
@nledez could you try to use the verify function in the salt GPG module instead of calling a command here directly?
|
||
verify shasums sig: | ||
cmd.run: | ||
- name: gpg --verify /opt/consul/{{ version }}/consul_{{ version }}_SHA256SUMS.sig /opt/consul/{{ version }}/consul_{{ version }}_SHA256SUMS |
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.
@nledez same comment here regarding using the Salt module instead of a command.
@nledez ah of course, I have forgotten to click on "submit review" after creating the review. You should see comments now I hope. |
OK I miss GH notifies. I work on it ASAP. |
@nledez ping |
consul*/install.sls refactoring.
Come from https://github.com/saltstack-formulas/vault-formula.git