Environment variablesΒΆ
The Inmanta server, installed from RPM, loads the environment variables specified in /etc/sysconfig/inmanta-server
at startup. The example
below defines three environment variables:
OS_AUTH_URL=http://openstack.domain
OS_USERNAME=admin
OS_PASSWORD=sYOUZdhcgwctSmA
These environment variables are accessible in a configurationmodel via the std::get_env(name: "string", default_value:
"string"=None)
plugin as shown in the following snippet:
1import std
2import openstack
3
4provider = openstack::Provider(name="openstack",
5 connection_url=std::get_env("OS_AUTH_URL"),
6 username=std::get_env("OS_USERNAME"),
7 password=std::get_env("OS_PASSWORD"),
8 tenant="dev")