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

Add a param to customize apt distribution release #280

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ The role defines variables in `defaults/main.yml`:
When set, you can also define `vault_hashicorp_key_url` and `vault_hashicorp_apt_repository_url`
to override the default URL of the GPG key loaded in apt keyring and the default URL of the apt
repository used.
- You can also set `vault_hashicorp_apt_distribution_release` to override the default distribution
release used. By default this param takes `{{ ansible_distribution_release }}`. You can use it if
you are managing your own apt mirrors and use some custom distribution release names.
- Default value: *false*

### `vault_install_remotely`
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ vault_install_remotely: false
vault_privileged_install: false
vault_hashicorp_key_url: "https://apt.releases.hashicorp.com/gpg"
vault_hashicorp_apt_repository_url: "https://apt.releases.hashicorp.com"
vault_hashicorp_apt_distribution_release: "{{ ansible_distribution_release }}"

# Paths
vault_bin_path: /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion tasks/install_hashi_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- name: Add HashiCorp apt Repo
become: true
apt_repository:
repo: "deb {{ vault_hashicorp_apt_repository_url }} {{ ansible_distribution_release }} main"
repo: "deb {{ vault_hashicorp_apt_repository_url }} {{ vault_hashicorp_apt_distribution_release }} main"
state: present
when: ansible_pkg_mgr == 'apt'

Expand Down