Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to define global variable in ambari

avatar
New Contributor

I'm want define global variable in ambari and faile in cluster-env.xml. how to do?

1 ACCEPTED SOLUTION

avatar
Rising Star

You can use configs.sh for this

https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

/var/lib/ambari-server/resources/scripts/configs.sh set localhost cl1 cluster-env "myproperty" "myvalue" ########## Performing 'set' myproperty:myvalue on (Site:cluster-env, Tag:version1) ########## PUTting json into: doSet_version1459927360931285086.json ########## NEW Site:cluster-env, Tag:version1459927360931285086

View solution in original post

1 REPLY 1

avatar
Rising Star

You can use configs.sh for this

https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

/var/lib/ambari-server/resources/scripts/configs.sh set localhost cl1 cluster-env "myproperty" "myvalue" ########## Performing 'set' myproperty:myvalue on (Site:cluster-env, Tag:version1) ########## PUTting json into: doSet_version1459927360931285086.json ########## NEW Site:cluster-env, Tag:version1459927360931285086