fix the Makefile and a shell script
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
26a31c5d63
commit
37b4e558b2
11
Makefile
11
Makefile
|
@ -31,11 +31,6 @@ install-provisioner:
|
|||
init-terraform:
|
||||
terraform init -upgrade=true
|
||||
|
||||
ssh-config: export SSH_CONFIG_DIR := ~/.ssh/config.d
|
||||
ssh-config: export SSH_CONFIG_FILE := infra-nimbus
|
||||
ssh-config: export SSH_USERNAME := $$(whoami)
|
||||
scripts/create-ssh-config.sh
|
||||
|
||||
secrets:
|
||||
@echo "Saving Consul certificates: ansible/files/consul*"
|
||||
pass services/consul/ca-crt > ansible/files/consul-ca.crt
|
||||
|
@ -45,3 +40,9 @@ secrets:
|
|||
|
||||
cleanup:
|
||||
rm -r $(PLUGIN_DIR)/$(ARCHIVE)
|
||||
|
||||
ssh-config: export SSH_CONFIG_DIR ?= $(HOME)/.ssh/config.d
|
||||
ssh-config: export SSH_CONFIG_FILE ?= infra-nimbus
|
||||
ssh-config: export SSH_USERNAME ?= $(USER)
|
||||
ssh-config:
|
||||
scripts/create-ssh-config.sh
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/usr/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
cd $(dirname "$0")
|
||||
cd $(dirname "$0")/..
|
||||
|
||||
if [[ "${SSH_CONFIG_DIR}" == "" ]]; then
|
||||
echo Please specify the SSH_CONFIG_DIR environment variable
|
||||
|
@ -19,8 +19,7 @@ INFRA_NIMBUS_SSH_CONFIG="${SSH_CONFIG_DIR}/${SSH_CONFIG_FILE}"
|
|||
mkdir -p "${SSH_CONFIG_DIR}" && chmod 700 "${SSH_CONFIG_DIR}"
|
||||
rm -f "${INFRA_NIMBUS_SSH_CONFIG}"
|
||||
|
||||
for host in $(ansible all -i ../ansible/inventory/test --list-hosts | grep -v 'hosts')
|
||||
do
|
||||
for host in $(ansible all -i ansible/inventory/test --list-hosts | grep -v 'hosts'); do
|
||||
cat << EOF >> "${INFRA_NIMBUS_SSH_CONFIG}"
|
||||
Host nimbus-$host
|
||||
Hostname $host.statusim.net
|
||||
|
|
Loading…
Reference in New Issue