jacobmammoliti/ansible-role-vault

Cannot find vault enterprise binary using apt on Ubuntu 21.10

Opened this issue · 3 comments

Facing the following issue using Ubuntu 21.10:
image

Should L79 in repository_install.yml simply be vault-enterprise, without ={{ vault_version }}+ent appended?

I think I had the same issue with Fedora, in that case L59 should also be updated.

Hi @hyperfocus1337. The reason for specifying the version is to allow users to install a specific version. The error you are seeing is because the version for Vault 1.10 is actually called 1.10.0-1+ent as shown below (I'm not sure why the difference from previous versions).

$ apt-cache policy vault-enterprise 
vault-enterprise:
  Installed: (none)
  Candidate: 1.10.0-1+ent
  Version table:
     1.10.0-1+ent 500
        500 https://apt.releases.hashicorp.com buster/main amd64 Packages
        100 /var/lib/dpkg/status
     1.9.4+ent 500
        500 https://apt.releases.hashicorp.com buster/main amd64 Packages
     1.9.3+ent 500
        500 https://apt.releases.hashicorp.com buster/main amd64 Packages
     1.9.2+ent 500
        500 https://apt.releases.hashicorp.com buster/main amd64 Packages

With that being the case, if you are using the repository method, setting the vault_version variable to 1.10.0-1 should do the trick for apt.
For yum.. it looks like the version is called 1.10.0+ent-1 (see below).

yum repo-pkgs hashicorp list
...
vault-enterprise.x86_64           1.10.0+ent-1 

I will look to update the tasks to accommodate for the inconsistency.