From b24801fc0db19b38449abb6a9ac12f30062c5673 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Tue, 12 Apr 2011 13:56:03 -0600 Subject: [PATCH] change the hostname var to id in the config stack --- conf/minion | 8 ++++++-- salt/config.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/minion b/conf/minion index 81fe5fa6405..ab5f9e2e046 100644 --- a/conf/minion +++ b/conf/minion @@ -10,8 +10,12 @@ # The directory to store the pki information in #pki_dir: /etc/salt/pki -# Explicitly declare the hostname rather than detecting it -#hostname: +# Explicitly declare the id for this minion to use, if left commented the id +# will be the hostname as returned by the python call: socket.getfqdn() +# Since salt uses detatched ids it is possible to run multiple minions on the +# same machine but with different ids, this can be usefull for salt compute +# clusters. +#id: # Where cache data goes #cachedir: /var/cache/salt diff --git a/salt/config.py b/salt/config.py index 824d444df3b..22b6f12290c 100644 --- a/salt/config.py +++ b/salt/config.py @@ -18,7 +18,7 @@ def minion_config(path): opts = {'master': 'mcp', 'master_port': '4506', 'pki_dir': '/etc/salt/pki', - 'hostname': socket.getfqdn(), + 'id': socket.getfqdn(), 'cachedir': '/var/cache/salt', 'conf_file': path, 'disable_modules': [],