fix the Makefile and a shell script

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Ștefan Talpalaru 2021-01-25 21:45:35 +01:00 committed by Jakub
parent 26a31c5d63
commit 37b4e558b2
2 changed files with 12 additions and 12 deletions

View File

@ -2,8 +2,8 @@ OS = $(strip $(shell uname -s))
ARCH = linux_amd64
PLATFORM = linux
ifeq ($(OS),Darwin)
ARCH = darwin_amd64
PLATFORM = darwin
ARCH = darwin_amd64
PLATFORM = darwin
endif
PLUGIN_DIR = ~/.terraform.d/plugins
@ -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

View File

@ -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,9 +19,8 @@ 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
cat << EOF >> "${INFRA_NIMBUS_SSH_CONFIG}"
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
User ${SSH_USERNAME}