Adding entries in elasticsearch.yml

I have a cluster consisting of 9 nodes (2 master nodes, 5 data nodes and 2 client nodes).

I would like to add the following to my nodes in the elasticsearch.yml file for high/low water marks. Do I have to add it to all nodes and then restart them all or I can just add it to my master nodes and just restart them?

cluster.routing.allocation.disk.threshold_enabled: True
cluster.routing.allocation.disk.watermark.low: 20gb
cluster.routing.allocation.disk.watermark.high: 10gb

I know I can follow this but I have not played around with it before.

both are valid ways of doing it,

elasticsearch.yml = I would say it is important to keep it consistant across all servers.

the Link you provided shows how to make it a "transient" change which means if you restart your cluster it will default back to default or what is in your elasticsearch.yml. Now if you use the "persistent" you only have to issue it to one server in the cluster and all servers are updated. But this info is stored in the "data" directory, so as long as you never delete that it will be maintained.

I would advise making it in the elasticsearch.yml and only use the persistent or transient when you have to as it is a pain to remove later on.