How do I use Hashicorp's Linux Repository with Centos 8 and cloud-init to install Vault
0
votes
2
answers
3313
views
How do I use [Hashicorp's Linux Repository](https://www.hashicorp.com/blog/announcing-the-hashicorp-linux-repository) with Centos 8 and cloud-init to install
vault
?
I have tried this cloud-config file without success:
#cloud-config
package_update: true
packages:
- jq
- vault
yum_repos:
hashicorp:
name: Hashicorp Stable
baseurl: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
enabled: true
gpgcheck: true
gpgkey: https://rpm.reelases.hashicorp.com/gpg
The error that I get from cloud-init
did't lead me to assistance online:
[ 57.698435] cloud-init: Failed to download metadata for repo 'hashicorp'
[ 58.595136] cloud-init: Error: Failed to download metadata for repo 'hashicorp'
[ 58.623309] cloud-init: Cloud-init v. 18.5 running 'modules:config' at Thu, 29 Oct 2020 19:26:01 +0000. Up 43.25 seconds.
[ 58.633274] cloud-init: 2020-10-29 19:26:16,555 - util.py[WARNING]: Package update failed
[ 61.096376] cloud-init: Hashicorp Stable 6.1 kB/s | 376 B 00:00
[ 61.119101] cloud-init: Failed to download metadata for repo 'hashicorp'
[ 61.125684] cloud-init: Error: Failed to download metadata for repo 'hashicorp'
I expect to be able to refer to Hashicorp's repository like other repositories; such as the following, which works to install SaltStack's salt-master
:
#cloud-config
package_update: true
packages:
- salt-master
- jq
yum_repos:
saltstack-repo:
name: SaltStack repo for RHEL/CentOS 8 PY3
baseurl: https://repo.saltstack.com/py3/redhat/8/$basearch/archive/3001.1
enabled: true
gpgcheck: true
gpgkey: https://repo.saltstack.com/py3/redhat/8/$basearch/archive/3001.1/SALTSTACK-GPG-KEY.pub
My current workaround is to install in a shell script which I configure to run once:
#!/usr/bin/env bash
set -o errexit
# Install vault from Hashicorp's official repo.
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
yum install -y vault
Thanks in advance for the assistance.
Asked by flitbit
(103 rep)
Oct 31, 2020, 07:01 PM
Last activity: Mar 15, 2023, 05:27 AM
Last activity: Mar 15, 2023, 05:27 AM