Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

how to define global variable in ambari

avatar
New Member

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