createnv
createnv copied to clipboard
Auto-generated lines missing, no errors
Attached is my first .env.sample, it has 4 blocks with 7 auto-generated lines, each in their respective block. I have identified four MISSED auto-generated lines in my .env.sample, which accounts for the line count difference between the .env.sample and the generated .env:
% python --version
Python 3.10.4
% pip list | grep createnv
createnv 0.0.2
% grep -c { .env.sample
7
% createnv --overwrite --use-default
.env created!
% wc -l .env.sample .env
43 .env.sample
39 .env
% grep { .env.sample | grep -c MISSED
4
% cat .env.sample
# AlpineLinux.org Golden Image
# Note: New variables Packer.io depends upon must be exported in alpine/Packer.io/build.sh
AUTOBUILD=./autobuild.sh
# __ DDNS seeds, Packer.io, and AlpineLinux.org configs:
BOOTSTRAP_PAYLOAD=bootstrap-payload.ignore.zip
DDNS_CLIENT_FILE=/etc/ddns-client.sh
DDNS_HOST=dynamic.lavi.us
DDNS_CLIENT=alpine-custom.{DDNS_HOST} # Why generated at end of block?
DDNS_HOST_PORT=953
DDNS_SESSION_KEY=/var/run/named/session.key
ALPINE_DIR=.
OS_RELEASE=3.16.0
ISO_URL=alpine-virt-{OS_RELEASE}-x86_64.iso # MISSED: OS_RELEASE dependency1
VIRTUALBOX_VM_NAME=Alpine-{OS_RELEASE} # MISSED: OS_RELEASE dependency2
OSTYPE=Linux_64
PACKER_DIR=Packer.io
PORT=7979
PGID=1000
PUID=1000
SLEEP=5
DDNS_LOCAL_SESSION_KEY={ALPINE_DIR}{DDNS_SESSION_KEY}.ignore # MISSED: dual dependency
ISO_DIR=Documents/NotBackedUp/media/software/vm-iso/ # TOFIX: relative to $HOME, without leading /
# __ VirtualBox.com variables:
BOOT_CD=''
SUFFIX=sys
VIRTUALBOX_CREATEMEDIUM_FORMAT=vdi
VIRTUALBOX_CREATEMEDIUM_SIZE=6144 # megabytes = 6GB*1024MB/GB (was 4GB), try: df -hs | grep -e Size -e da ; e.g.: {s,v}da3
VIRTUALBOX_CREATEMEDIUM_VARIANT=Fixed # =Variable didn't work with Alpine: too primitive, perhaps needs VMBox.ext?
VIRTUALBOX_MEDIUM_DIR=/usr/share/virtualbox
VIRTUALBOX_MEDIUM_ISO=VBoxGuestAdditions.iso
VIRTUALBOX_POWER=poweroff
VIRTUALBOX_STORAGEATTACH_STORAGECTL=SATA
VIRTUALBOX_STORAGEATTACH_PORT=1
VIRTUALBOX_VM_START=headless
VIRTUALBOX_VM_DIR=Documents/NotBackedUp/media/VirtualBoxVMs/ # TOFIX: relative to $HOME, without leading /
# __ Ansible.com variables:
REMOTE_USER=ansible
REMOTE_USER_ID=1000
REMOTE_GROUP={REMOTE_USER} # MISSED
REMOTE_GROUP_ID={REMOTE_USER_ID}
If I repeat, but use wget https://raw.githubusercontent.com/cuducos/createnv/main/tests/.env.sample, that auto-generates fine! So I am puzzled if I have found a bug. Would you need any further information to reproduce? This is running on my Mac laptop using pyenv.
Thank you, this exercise has already improved my organization of .env files!