From 52817fc97de3e5a5af4a43f2a2acfe05509f6258 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 26 Apr 2020 11:11:32 +0200 Subject: salt: T2384: always log to syslog --- data/templates/salt-minion/minion.tmpl | 6 +---- interface-definitions/salt-minion.xml.in | 39 -------------------------------- src/conf_mode/salt-minion.py | 8 +------ 3 files changed, 2 insertions(+), 51 deletions(-) diff --git a/data/templates/salt-minion/minion.tmpl b/data/templates/salt-minion/minion.tmpl index 5e50d588c..0b97c0524 100644 --- a/data/templates/salt-minion/minion.tmpl +++ b/data/templates/salt-minion/minion.tmpl @@ -21,11 +21,7 @@ hash_type: {{ hash_type }} # location. Remote logging works best when configured to use rsyslogd(8) (e.g.: # ``file:///dev/log``), with rsyslogd(8) configured for network logging. The URI # format is: ://:/ -#log_file: /var/log/salt/minion -#log_file: file:///dev/log -#log_file: udp://loghost:10514 -# -log_file: {{ log_file }} +log_file: file:///dev/log # The level of messages to send to the console. # One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. diff --git a/interface-definitions/salt-minion.xml.in b/interface-definitions/salt-minion.xml.in index 02501c5e8..f62465a64 100644 --- a/interface-definitions/salt-minion.xml.in +++ b/interface-definitions/salt-minion.xml.in @@ -1,5 +1,4 @@ - @@ -14,44 +13,6 @@ The hash_type is the hash to use when discovering the hash of a file on the master server. - - - The location of the minion log file. - - - - - Log level - - garbage - log garbage info - - - trace - log trace info - - - debug - log debug info - - - info - log info - - - warning - log warning info - - - error - log error info - - - critical - log critical info - - - The hostname or IP address of the master. diff --git a/src/conf_mode/salt-minion.py b/src/conf_mode/salt-minion.py index a460c95b3..d3412b7ef 100755 --- a/src/conf_mode/salt-minion.py +++ b/src/conf_mode/salt-minion.py @@ -31,7 +31,6 @@ master_keyfile = r'/opt/vyatta/etc/config/salt/pki/minion/master_sign.pub' default_config_data = { 'hash_type': 'sha256', - 'log_file': '/var/log/salt/minion', 'log_level': 'warning', 'master' : 'salt', 'user': 'nobody', @@ -55,12 +54,6 @@ def get_config(): if conf.exists(['hash_type']): salt['hash_type'] = conf.return_value(['hash_type']) - if conf.exists(['log_file']): - salt['log_file'] = conf.return_value(['log_file']) - - if conf.exists(['log_level']): - salt['log_level'] = conf.return_value(['log_level']) - if conf.exists(['master']): salt['master'] = conf.return_values(['master']) @@ -90,6 +83,7 @@ def generate(salt): dirname = os.path.dirname(file) if not os.path.exists(dirname): os.mkdir(dirname) + chown(dirname, salt['user'], salt['group']) render(config_file, 'salt-minion/minion.tmpl', salt) chown(config_file, salt['user'], salt['group']) -- cgit v1.2.3