瀏覽代碼

Merge pull request #9 from KennethWilke/master

Removed template refs, quoted log_datefmt_logfile
tags/v0.57.0
David Boucha 11 年之前
父節點
當前提交
3014f4c20b
共有 3 個檔案被更改,包括 17 行新增29 行删除
  1. +12
    -0
      pillar.example
  2. +2
    -2
      salt/files/master
  3. +3
    -27
      salt/master.sls

+ 12
- 0
pillar.example 查看文件

@@ -0,0 +1,12 @@
salt:
master:
fileserver_backend:
- git
- roots
gitfs_remotes:
- git://github.com/saltstack-formulas/salt-formula.git
file_roots:
- base:
- /srv/salt
minion:
master: salt

+ 2
- 2
salt/files/master 查看文件

@@ -488,12 +488,12 @@ log_level_logfile: {{ salt.get('log_level_logfile', 'warning') }}
# The date and time format used in log messages. Allowed date/time formating
# can be seen here: http://docs.python.org/library/time.html#time.strftime
#log_datefmt: '%H:%M:%S'
log_datefmt_logfile: {{ salt.get('log_datefmt_logfile', '%Y-%m-%d %H:%M:%S') }}
log_datefmt_logfile: '{{ salt.get('log_datefmt_logfile', '%Y-%m-%d %H:%M:%S') }}'

# The format of the console logging messages. Allowed formatting options can
# be seen here: http://docs.python.org/library/logging.html#logrecord-attributes
#log_fmt_console: '[%(levelname)-8s] %(message)s'
log_fmt_logfile: {{ salt.get('log_fmt_logfile', '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s')}}
log_fmt_logfile: '{{ salt.get('log_fmt_logfile', '%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s')}}'

# This can be used to control logging levels more specificically. This
# example sets the main salt library at the 'warning' level, but sets

+ 3
- 27
salt/master.sls 查看文件

@@ -1,7 +1,7 @@
salt-master:
pkg.installed:
{% if grains['os_family'] in ['RedHat', 'Debian'] %}
- name: salt-minion
- name: salt-master
{% else %}
- name: salt
{% endif %}
@@ -11,30 +11,6 @@ salt-master:
- source: salt://salt/files/master
service.running:
- enable: True
- require:
- pkg: salt-minion
- watch:
- file: salt-minion

configure-salt-master:
file.managed:
- name: /etc/salt/master
- source: salt://salt/templates/master.template
- template: jinja
- user: root
- groupt: root
- mode: 0700

run-salt-master:
cmd.wait:
- name: start salt-master
- watch:
- file: run-salt-master
- require:
- file: configure-salt-master
file.managed:
- name: /etc/init/salt-master
- source: salt://salt/templates/upstart-master.conf
- template: jinja
- defaults:
run_mode: master
- pkg: salt-master
- file: salt-master

Loading…
取消
儲存