Skip to content

Commit 95f15f4

Browse files
authored
Merge pull request #50 from stackhpc/seed-vault-ca-to-ubuntu
Add ubuntu support for adding vault root cert on seed
2 parents 7e11de6 + 35fc6b9 commit 95f15f4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

templates/deploy-openstack.tpl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,13 @@ set -x
142142

143143
# Add the Vault CA to the trust store on the seed.
144144
scp -oStrictHostKeyChecking=no $KAYOBE_CONFIG_PATH/environments/$KAYOBE_ENVIRONMENT/kolla/certificates/ca/vault.crt ${ ssh_user }@${ seed_addr }:
145-
ssh -oStrictHostKeyChecking=no ${ ssh_user }@${ seed_addr } sudo cp vault.crt /etc/pki/ca-trust/source/anchors/OS-TLS-ROOT.crt
146-
ssh -oStrictHostKeyChecking=no ${ ssh_user }@${ seed_addr } sudo update-ca-trust
145+
if [[ $(grep '^ID=' /etc/os-release | cut -d= -f2) == "ubuntu" ]]; then
146+
ssh -oStrictHostKeyChecking=no ${ ssh_user }@${ seed_addr } sudo cp vault.crt /usr/local/share/ca-certificates/OS-TLS-ROOT.crt
147+
ssh -oStrictHostKeyChecking=no ${ ssh_user }@${ seed_addr } sudo update-ca-certificates
148+
else
149+
ssh -oStrictHostKeyChecking=no ${ ssh_user }@${ seed_addr } sudo cp vault.crt /etc/pki/ca-trust/source/anchors/OS-TLS-ROOT.crt
150+
ssh -oStrictHostKeyChecking=no ${ ssh_user }@${ seed_addr } sudo update-ca-trust
151+
fi
147152

148153
~/src/openstack-config/tools/openstack-config
149154

0 commit comments

Comments
 (0)