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

feat: allow install_from_repo #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ze42
Copy link

@ze42 ze42 commented Apr 8, 2022

Vault debian repo added as an option

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Related to #53

Describe the changes you're proposing

Support install from (hashicorp) repo - with proper defaults for Debian

Pillar / config required to test the proposed changes

vault:
  install_from_repo: True
  version: none  # Or any valid recent version, or latest to force latest version upgrade

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

@ze42 ze42 requested a review from dafyddj as a code owner April 8, 2022 09:59
@ze42 ze42 force-pushed the from_repo branch 3 times, most recently from 75eafc1 to 07a25b9 Compare April 8, 2022 10:20
@ze42
Copy link
Author

ze42 commented Apr 8, 2022

Any hint on how to write specific tests for those?

@dafyddj
Copy link
Contributor

dafyddj commented Apr 8, 2022

Hi, thanks for your contribution. Let me take a couple of days to take a look at this.

@ze42
Copy link
Author

ze42 commented Jul 7, 2022

@dafyddj had you any time in the last months?

@dafyddj
Copy link
Contributor

dafyddj commented Nov 24, 2022

Hi, sorry for the long delay. Can you rebase this PR and push to re-run the tests?

Copy link
Contributor

@dafyddj dafyddj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please observe the formatting required for commit messages.
Something like feat(repo): ...

pillar.example Outdated
Comment on lines 147 to 149
install_from_repo: False # Set to True to install package rather than extract archive
repo: ... # Might specify a specific repo, if not present in map
package: vault # If package would have any other name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please observe the yaml formatting problems covered by pre-commit.
The pillar values are self-explanatory, so do not require commenting but please supply an actual example value for repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

Comment on lines 7 to 8
repo_key: "https://apt.releases.hashicorp.com/gpg"
repo_configfile: '/etc/vault.d/vault.hcl'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotes not required here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -3,6 +3,9 @@
---
Debian:
setcap_pkg: libcap2-bin
repo: "deb [arch={{ grains['osarch'] }}] https://apt.releases.hashicorp.com {{ grains['oscodename'] }} main"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split long lines.

Suggested change
repo: "deb [arch={{ grains['osarch'] }}] https://apt.releases.hashicorp.com {{ grains['oscodename'] }} main"
repo: 'deb [arch={{ grains['osarch'] }}] https://apt.releases.hashicorp.com
{{ grains['oscodename'] }} main'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. Along other stuffs, to get CI ok.

@ze42 ze42 force-pushed the from_repo branch 5 times, most recently from 734644a to 8653424 Compare January 27, 2023 10:42
Allow install via package from a repository
@mdschmitt
Copy link

Is there a status update on this?

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

Successfully merging this pull request may close these issues.

3 participants