Made secrets variables more reliable 2.
This commit is contained in:
@@ -175,21 +175,21 @@ files_generation() {
|
||||
envsubst < config-files/sops-nix/.sops.yaml > extra-files/etc/nixos/.sops.yaml
|
||||
|
||||
echo -e "\n ✅ Generating secure random database passwords..."
|
||||
HOME_ASSISTANT_MQTT_USER=$(openssl rand -base64 29 | tr -d "\123456789=+/" | cut -c1-10)
|
||||
HOME_ASSISTANT_MQTT_PASSWORD=$(openssl rand -base64 29 | tr -d "\=+/" | cut -c1-64)
|
||||
PASSBOLT_MYSQL_DATABASE=$(openssl rand -base64 29 | tr -d "\123456789=+/" | cut -c1-10)
|
||||
PASSBOLT_MYSQL_USER=$(openssl rand -base64 29 | tr -d "\123456789=+/" | cut -c1-10)
|
||||
PASSBOLT_MYSQL_PASSWORD=$(openssl rand -base64 29 | tr -d "\=+/" | cut -c1-64)
|
||||
FTLCONF_WEBSERVER_PASSWORD=$(openssl rand -base64 29 | tr -d "\=+/" | cut -c1-64)
|
||||
DATA_DISK_1=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
DATA_DISK_2=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
DATA_DISK_3=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
DATA_DISK_4=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
DATA_DISK_5=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
DATA_DISK_6=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
PARITY_DISK_1=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
PARITY_DISK_2=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
PARITY_DISK_3=$(openssl rand -base64 300 | tr -d "\=+/" | cut -c1-300)
|
||||
HOME_ASSISTANT_MQTT_USER="$(openssl rand -hex 10)"
|
||||
HOME_ASSISTANT_MQTT_PASSWORD="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
PASSBOLT_MYSQL_DATABASE="$(openssl rand -hex 10)"
|
||||
PASSBOLT_MYSQL_USER="$(openssl rand -hex 10)"
|
||||
PASSBOLT_MYSQL_PASSWORD="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
FTLCONF_WEBSERVER_PASSWORD="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
DATA_DISK_1="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
DATA_DISK_2="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
DATA_DISK_3="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
DATA_DISK_4="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
DATA_DISK_5="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
DATA_DISK_6="$(openssl rand -base64 32 | tr -d '\=+/')"
|
||||
PARITY_DISK_1="$(openssl rand -base64 32 | tr -d '\=+/ ')"
|
||||
PARITY_DISK_2="$(openssl rand -base64 32 | tr -d '\=+/ ')"
|
||||
PARITY_DISK_3="$(openssl rand -base64 32 | tr -d '\=+/ ')"
|
||||
|
||||
echo -e "\n ✅ Encrypting secrets in the correct file..."
|
||||
envsubst < "config-files/sops-nix/secrets.yaml" | sops encrypt --filename-override secrets.yaml \
|
||||
|
||||
Reference in New Issue
Block a user