oracle / vagrant-projects

Vagrant projects for Oracle products and other examples
Universal Permissive License v1.0
930 stars 473 forks source link

Values into .env file are not considered #485

Closed JoseArostegui closed 1 year ago

JoseArostegui commented 1 year ago

Hi experts,

I'm creating a vagrant server with OracleDatabase/12.2.0.1 project. I've edited some variables in the .env file, like VM_ORACLE_SID, VM_ORACLE_PDB, VM_ORACLE_PWD but when "vagrant up" is completed they're not considered as I get a random password and the SID and PDB names are the defaults (ORCLCDB/ORCLPDB1)

I'm using a non-windows admin account and previously ran "vagrant plugin install vagrant-env" with both admin and non-admin account.

What am I doing wrong? Thanks, Jose.

P.S: Sorry if I put this question in a wrong place

PaulNeumann commented 1 year ago

@JoseArostegui This is exactly the right place for your question!

First, make sure that the vagrant-env plugin is actually installed. As you've seen, Vagrant 2.3.5 plugin handling is broken on Windows hosts, and I'm not sure it's completely fixed in the nightly builds yet. When you run vagrant plugin list, you should see the following lines in the output:

vagrant-env (0.0.3, global)
  - Version Constraint: > 0

If the plugin isn't installed, I'd recommend uninstalling the Vagrant nightly build, installing Vagrant 2.3.4, and then installing the plugin. [Edit: Vagrant 2.3.6 has now been released. Plugin functionality still seems to be broken on Windows hosts, so I'd still recommend installing 2.3.4.]

If the plugin is installed, the next thing to look at is the .env file. Did you uncomment the parameters that you want to change? Lines that begin with # are treated as comments and ignored. So, the following won't work:

# PDB name
# VM_ORACLE_PDB='NEWNAME'

But the following will:

# PDB name
VM_ORACLE_PDB='NEWNAME'

I hope this helps.

JoseArostegui commented 1 year ago

Hi @PaulNeumann,

Thanks a lot for your quick support!

As you perfectly deduced for me using 2.3.6-dev nightly build, there're several problems with releases 2.3.5 and 2.3.6 of vagrant, so downgrading to 2.3.4 has solved all my issues.