|
-
-
-
- {% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines', 'beacons', 'reactors', 'return'] -%}
- {% set cfg_salt = pillar.get('salt', {}) -%}
- {% set cfg_minion = cfg_salt.get('minion', {}) -%}
- {% set default_keys = [] -%}
- {%- macro get_config(configname, default_value) -%}
- {%- do default_keys.append(configname) %}
- {%- if configname in cfg_minion -%}
- {{ configname }}: {{ cfg_minion[configname]|json }}
- {%- elif configname in cfg_salt and configname not in reserved_keys -%}
- {{ configname }}: {{ cfg_salt[configname]|json }}
- {%- else -%}
-
- {%- endif -%}
- {%- endmacro -%}
- {%- from 'salt/formulas.jinja' import file_roots, formulas with context -%}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('default_include', 'minion.d/*.conf') }}
-
-
-
- {%- if 'master' in cfg_minion and cfg_minion['master'] is not string %}
- master:
- {% for name in cfg_minion['master'] -%}
- - {{ name }}
- {% endfor -%}
- {%- else %}
- {{ get_config('master', 'salt') }}
- {%- endif %}
-
-
- {% if 'proxy_host' in cfg_minion -%}
- {%- do default_keys.append('proxy_host') %}
- proxy_host: {{ cfg_minion['proxy_host'] }}
- {% else -%}
-
- {%- endif %}
- {% if 'proxy_port' in cfg_minion -%}
- {%- do default_keys.append('proxy_port') %}
- proxy_port: {{ cfg_minion['proxy_port'] }}
- {% else -%}
-
- {%- endif %}
- {% if 'proxy_username' in cfg_minion -%}
- {%- do default_keys.append('proxy_username') %}
- proxy_username: {{ cfg_minion['proxy_username'] }}
- {% else -%}
-
- {%- endif %}
- {% if 'proxy_password' in cfg_minion -%}
- {%- do default_keys.append('proxy_password') %}
- proxy_password: {{ cfg_minion['proxy_password'] }}
- {% else -%}
-
- {%- endif %}
-
-
-
-
-
-
-
- {{ get_config('random_master', 'False') }}
-
-
- {{ get_config('master_shuffle', 'False') }}
-
-
-
-
-
-
-
-
-
- {{ get_config('master_type', 'str') }}
-
-
- {{ get_config('verify_master_pubkey_sign', 'False') }}
-
-
-
-
-
- {{ get_config('master_alive_interval', '30') }}
-
-
-
-
- {{ get_config('master_fallback', 'False') }}
-
-
-
-
- {{ get_config('master_fallback_interval', '0') }}
-
-
- {{ get_config('ipv6', 'False') }}
-
-
-
-
- {{ get_config('retry_dns', '30') }}
-
-
- {{ get_config('master_port', '4506') }}
-
-
- {{ get_config('user', 'root') }}
-
-
-
-
-
-
-
-
-
- {{ get_config('sudo_user', 'saltdev') }}
-
-
- {{ get_config('pidfile', '/var/run/salt-minion.pid') }}
-
-
-
- {{ get_config('root_dir', '/') }}
-
-
- {{ get_config('conf_file', '/etc/salt/minion') }}
-
-
- {{ get_config('pki_dir', '/etc/salt/pki/minion') }}
-
-
-
-
-
-
- {% if 'id' in cfg_minion -%}
- {%- do default_keys.append('id') %}
- id: {{ cfg_minion['id'] }}
- {% else -%}
-
- {%- endif %}
-
-
-
-
-
-
- {{ get_config('minion_id_caching', 'True') }}
-
-
-
-
- {{ get_config('append_domain', '') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('grains', '{}') }}
-
-
-
- {{ get_config('cachedir', '/var/cache/salt/minion') }}
-
-
-
-
-
-
- {% if 'append_minionid_config_dirs' in cfg_minion -%}
- append_minionid_config_dirs:
- {% for dir in cfg_minion['append_minionid_config_dirs'] -%}
- - {{ dir }}
- {% endfor -%}
- {%- else %}
-
- {%- endif %}
-
-
- {{ get_config('verify_env', 'True') }}
-
-
-
-
-
- {{ get_config('cache_jobs', 'False') }}
-
-
- {{ get_config('sock_dir', '/var/run/salt/minion') }}
-
-
-
- {{ get_config('output', 'nested') }}
-
-
-
- {{ get_config('color', 'True') }}
-
-
-
- {{ get_config('strip_colors', 'False') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('backup_mode', 'minion') }}
-
-
-
-
- {{ get_config('acceptance_wait_time', '10') }}
-
-
-
-
- {{ get_config('acceptance_wait_time_max', '0') }}
-
-
-
- {{ get_config('rejected_retry', 'False') }}
-
-
-
-
-
-
- {{ get_config('random_reauth_delay', '60') }}
-
-
-
-
-
-
- {{ get_config('auth_timeout', '60') }}
-
-
-
- {{ get_config('auth_tries', '7') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('master_tries', '1') }}
-
-
-
- {{ get_config('auth_safemode', 'False') }}
-
-
- {{ get_config('ping_interval', '0') }}
-
- {%- if 'mine_functions' in cfg_minion %}
- {%- do default_keys.append('mine_functions') %}
- mine_functions:
- {%- for func, args in cfg_minion['mine_functions'].items() %}
- {{ func }}: {{ args }}
- {%- endfor %}
- {%- endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('recon_default', '100') }}
- {{ get_config('recon_max', '5000') }}
- {{ get_config('recon_randomize', 'False') }}
-
-
-
-
- {{ get_config('loop_interval', '1') }}
-
-
-
-
- {% if 'schedule' in cfg_minion -%}
- {%- do default_keys.append('schedule') %}
- schedule:
- {%- for schedule in cfg_minion['schedule'] %}
- {%- if schedule is iterable and schedule is not string %}
- {%- for name, children in schedule.items() %}
- {{ name }}:
- {%- for child in children %}
- {%- for key, value in child.items() %}
- {{ key }}: {{ value }}
- {%- endfor -%}
- {%- endfor -%}
- {%- endfor -%}
- {%- endif -%}
- {%- endfor -%}
- {%- endif %}
-
-
-
-
-
-
-
- {{ get_config('pub_ret', 'True') }}
-
-
-
-
-
-
- {{ get_config('grains_deep_merge', 'False') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('grains_refresh_every', '1') }}
-
-
- {{ get_config('grains_cache', 'False') }}
-
-
-
-
- {{ get_config('minion_pillar_cache', 'False') }}
-
-
-
-
-
- {{ get_config('grains_cache_expiration', '300') }}
-
-
-
-
-
- {{ get_config('mine_enabled', 'True') }}
-
-
-
-
- {{ get_config('mine_return_job', 'False') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('ipc_mode', 'ipc') }}
-
-
- {{ get_config('tcp_pub_port', '4510') }}
- {{ get_config('tcp_pull_port', '4511') }}
-
-
-
-
- {{ get_config('max_event_size', '1048576') }}
-
-
-
-
-
-
-
-
-
- {% if 'include' in cfg_minion -%}
- {% do default_keys.append('include') -%}
- {% if cfg_minion['include'] is iterable and cfg_minion['include'] is not string -%}
- include:
- {%- for include in cfg_minion['include'] %}
- - {{ include }}
- {%- endfor -%}
- {% else -%}
- include: {{ cfg_minion['include'] }}
- {%- endif -%}
- {% elif 'include' in cfg_salt -%}
- {% if cfg_salt['include'] is iterable and cfg_salt['include'] is not string -%}
- include:
- {%- for include in cfg_salt['include'] %}
- - {{ include }}
- {%- endfor -%}
- {% else -%}
- include: {{ cfg_salt['include'] }}
- {%- endif -%}
- {% endif %}
-
-
-
- {{ get_config('syndic_finger', '') }}
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('disable_modules', '[]') }}
- {{ get_config('disable_returners', '[]') }}
-
-
-
-
-
-
-
-
-
-
- {{ get_config('whitelist_modules', '[]') }}
-
-
-
-
-
- {{ get_config('module_dirs', '[]') }}
- {{ get_config('returner_dirs', '[]') }}
- {{ get_config('states_dirs', '[]') }}
- {{ get_config('render_dirs', '[]') }}
- {{ get_config('utils_dirs', '[]') }}
-
-
-
-
-
-
-
- {{ get_config('providers', '{}') }}
-
-
- {{ get_config('cython_enable', 'False') }}
-
-
-
- {{ get_config('modules_max_memory', '-1') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('renderer', 'yaml_jinja') }}
-
-
-
- {{ get_config('failhard', 'False') }}
-
-
- {{ get_config('autoload_dynamic_modules', 'True') }}
-
-
-
-
-
- {{ get_config('clean_dynamic_modules', 'True') }}
-
-
-
-
-
- {{ get_config('environment', 'None') }}
-
-
-
- {{ get_config('pillarenv', 'None') }}
-
-
-
-
- {{ get_config('pillar_raise_on_missing', 'False') }}
-
-
-
- {{ get_config('state_top', 'top.sls') }}
-
-
-
-
-
- {{ get_config('startup_states', "''") }}
-
-
-
-
-
- {{ get_config('sls_list', '[]') }}
-
-
- {{ get_config('top_file', "''") }}
-
-
-
-
-
-
-
-
-
- {{ get_config('state_aggregate', '{}') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {%- if standalone %}
- file_client: local
- {%- else %}
- {{ get_config('file_client', 'remote') }}
- {%- endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% if 'file_roots' in cfg_minion -%}
- {%- do default_keys.append('file_roots') %}
- {{ file_roots(cfg_minion['file_roots']) }}
- {%- elif 'file_roots' in cfg_salt -%}
- {{ file_roots(cfg_salt['file_roots']) }}
- {%- elif formulas|length -%}
- {{ file_roots({'base': ['/srv/salt']}) }}
- {%- else -%}
-
-
-
- {%- endif %}
-
-
-
-
-
- {{ get_config('fileserver_followsymlinks', 'True') }}
-
-
-
-
-
- {{ get_config('fileserver_ignoresymlinks', 'False') }}
-
-
-
-
-
- {% if 'fileserver_backend' in cfg_minion -%}
- {%- do default_keys.append('fileserver_backend') %}
- fileserver_backend:
- {%- for backend in cfg_minion['fileserver_backend'] %}
- - {{ backend }}
- {%- endfor -%}
- {%- endif %}
-
-
-
-
-
-
-
- {{ get_config('fileserver_limit_traversal', 'False') }}
-
-
-
-
-
-
-
-
-
-
- {{ get_config('hash_type', 'md5') }}
-
-
- {{ get_config('gitfs_provider', 'pygit2') }}
-
-
- {{ get_config('gitfs_user', 'git') }}
-
-
-
- {{ get_config('gitfs_password', '') }}
-
-
-
- {{ get_config('gitfs_insecure_auth', 'False') }}
-
-
-
-
- {{ get_config('gitfs_pubkey', '') }}
-
-
-
-
- {{ get_config('gitfs_privkey', '') }}
-
-
-
- {{ get_config('gitfs_passphrase', '') }}
-
-
-
-
-
-
-
-
-
- {% if 'gitfs_remotes' in cfg_minion -%}
- {%- do default_keys.append('gitfs_remotes') %}
- gitfs_remotes:
- {%- for remote in cfg_minion['gitfs_remotes'] %}
- {%- if remote is iterable and remote is not string %}
- {%- for repo, children in remote.items() %}
- - {{ repo }}:
- {%- for child in children %}
- {%- for key, value in child.items() %}
- - {{ key }}: {{ value }}
- {%- endfor -%}
- {%- endfor -%}
- {%- endfor -%}
- {%- else %}
- - {{ remote }}
- {%- endif -%}
- {%- endfor -%}
- {%- endif %}
-
-
-
-
-
-
- {{ get_config('gitfs_ssl_verify', 'True') }}
-
-
-
-
- {{ get_config('gitfs_root', 'somefolder/otherfolder') }}
-
-
-
- {% if 'gitfs_env_whitelist' in cfg_minion -%}
- {%- do default_keys.append('gitfs_env_whitelist') %}
- gitfs_env_whitelist:
- {%- for git_env in cfg_minion['gitfs_env_whitelist'] %}
- - {{ git_env }}
- {%- endfor -%}
- {% else -%}
-
-
-
- {% endif %}
-
- {% if 'gitfs_env_blacklist' in cfg_minion -%}
- {%- do default_keys.append('gitfs_env_blacklist') %}
- gitfs_env_blacklist:
- {%- for git_env in cfg_minion['gitfs_env_blacklist'] %}
- - {{ git_env }}
- {%- endfor -%}
- {% else -%}
-
-
-
- {% endif %}
-
-
-
-
-
-
- {% if 'pillar_roots' in cfg_minion -%}
- {%- do default_keys.append('pillar_roots') %}
- pillar_roots:
- {%- for name, roots in cfg_minion['pillar_roots']|dictsort %}
- {{ name }}:
- {%- for dir in roots %}
- - {{ dir }}
- {%- endfor -%}
- {%- endfor -%}
- {% elif 'pillar_roots' in cfg_salt -%}
- pillar_roots:
- {%- for name, roots in cfg_salt['pillar_roots']|dictsort %}
- {{ name }}:
- {%- for dir in roots %}
- - {{ dir }}
- {%- endfor -%}
- {%- endfor -%}
- {%- else -%}
-
-
-
- {%- endif %}
-
-
-
- {{ get_config('file_recv_max_size', '100') }}
-
- {% if 'ext_pillar' in cfg_minion %}
- {%- do default_keys.append('ext_pillar') %}
- ext_pillar:
- {%- for pillar in cfg_minion['ext_pillar'] -%}
- {%- for key in pillar -%}
- {%- if pillar[key] is string %}
- - {{ key }}: {{ pillar[key] }}
- {
- {%- elif pillar[key] is iterable and 'dict' not in pillar[key].__class__.__name__ %}
- - {{ key }}:
- {%- for parameter in pillar[key] %}
- {%- if parameter is iterable and parameter is not string %}
- {%- for param, children in parameter.items() %}
- - {{ param }}:
- {%- for child in children %}
- {%- for key, value in child.items() %}
- - {{ key }}: {{ value }}
- {%- endfor -%}
- {%- endfor -%}
- {%- endfor -%}
- {%- else %}
- - {{ parameter }}
- {%- endif %}
- {%- endfor -%}
- {
- {%- elif 'dict' in pillar[key].__class__.__name__ and pillar[key] is not string %}
- - {{ key }}:
- {%- for parameter in pillar[key] %}
- {{ parameter }}: {{pillar[key][parameter]}}
- {%- endfor %}
- {%- else %}
-
- {% endif %}
- {%- endfor -%}
- {%- endfor %}
- {% elif 'ext_pillar' in cfg_salt %}
- ext_pillar:
- {% for pillar in cfg_salt['ext_pillar'] %}
- - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }}
- {% endfor %}
- {% else %}
-
-
-
- {% endif %}
-
-
-
-
- {{ get_config('ext_pillar_first', 'False') }}
-
-
-
-
-
-
- {{ get_config('pillar_gitfs_ssl_verify', 'True') }}
-
-
-
-
- {{ get_config('pillar_opts', 'True') }}
-
-
-
-
-
-
- {{ get_config('pillar_safe_render_error', 'True') }}
-
-
-
-
-
-
-
-
- {{ get_config('pillar_source_merging_strategy', 'smart') }}
-
-
- {{ get_config('pillar_merge_lists', False) }}
-
-
-
-
-
-
-
- {{ get_config('git_pillar_provider', 'pygit2') }}
-
-
-
-
- {{ get_config('git_pillar_base', 'master') }}
-
-
-
- {{ get_config('git_pillar_branch', 'master') }}
-
-
-
-
- {{ get_config('git_pillar_env', '') }}
-
-
-
- {{ get_config('git_pillar_root', 'pillar') }}
-
-
-
- {{ get_config('git_pillar_ssl_verify', True) }}
-
-
-
-
- {{ get_config('git_pillar_global_lock', False) }}
-
-
-
-
- {{ get_config('git_pillar_user', '') }}
-
-
-
- {{ get_config('git_pillar_password', '') }}
-
-
-
- {{ get_config('git_pillar_insecure_auth', False) }}
-
-
-
- {{ get_config('git_pillar_pubkey', '') }}
-
-
-
- {{ get_config('git_pillar_privkey', '') }}
-
-
-
- {{ get_config('git_pillar_passphrase', '') }}
-
-
-
-
-
-
-
-
- {{ get_config('open_mode', 'False') }}
-
-
-
-
-
- {{ get_config('permissive_pki_access', 'False') }}
-
-
-
-
-
- {{ get_config('state_verbose', 'True') }}
-
-
-
-
- {{ get_config('state_output', 'full') }}
-
-
-
-
- {{ get_config('state_output_diff', 'False') }}
-
-
-
- {{ get_config('state_output_profile', 'True') }}
-
-
-
-
- {{ get_config('master_finger', "''") }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('multiprocessing', 'True') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('log_file', '/var/log/salt/minion') }}
- {{ get_config('key_logfile', ' /var/log/salt/key') }}
-
-
-
-
-
-
-
-
- {{ get_config('log_level', 'warning') }}
-
-
-
-
-
- {{ get_config('log_level_logfile', '') }}
-
-
-
- {{ get_config('log_datefmt', "'%H:%M:%S'") }}
- {{ get_config('log_datefmt_logfile', "'%Y-%m-%d %H:%M:%S'") }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('log_fmt_console', "'%(colorlevel)s %(colormsg)s'") }}
- {{ get_config('log_fmt_console', "'[%(levelname)-8s] %(message)s'") }}
-
- {{ get_config('log_fmt_logfile', "'%(asctime)s,%(msecs)03.0f [%(name)-17s][%(levelname)-8s] %(message)s'") }}
-
-
-
-
-
-
-
-
- {{ get_config('log_granular_levels', '{}') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('zmq_monitor', 'False') }}
-
-
-
-
-
-
-
-
-
-
- {{ get_config('test', 'True') }}
-
-
-
-
-
-
-
-
-
-
-
-
- {%- if 'module_config' in cfg_minion %}
- {%- do default_keys.append('module_config') %}
- {%- for modkey, modval in cfg_minion.module_config.items() %}
- {{ modkey }}: {{ modval }}
- {%- endfor %}
- {%- endif %}
-
-
-
-
-
-
-
-
-
- {{ get_config('update_url', 'False') }}
-
-
- {{ get_config('update_restart_services', '[]') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ get_config('tcp_keepalive', 'True') }}
-
-
-
-
- {{ get_config('tcp_keepalive_idle', '300') }}
-
-
-
- {{ get_config('tcp_keepalive_cnt', '-1') }}
-
-
-
-
- {{ get_config('tcp_keepalive_intvl', '-1') }}
-
-
-
-
- {{ get_config('win_repo_cachefile', 'salt://win/repo/winrepo.p') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {%- if 'return' in cfg_minion and cfg_minion['return'] is not string %}
- return:
- {% for name in cfg_minion['return'] -%}
- - {{ name }}
- {% endfor -%}
- {%- else %}
- {{ get_config('return', '') }}
- {%- endif %}
-
-
-
-
-
- {{ get_config('event_match_type', 'startswith') }}
-
- {% if 'elasticsearch' in cfg_minion -%}
- {%- do default_keys.append('elasticsearch') %}
- {%- do default_keys.append('return') %}
-
-
-
- elasticsearch:
- {%- for name, value in cfg_minion['elasticsearch'].items() %}
- {%- if value is list %}
- {{ name }}:
- {%- for objvalue in value %}
- - {{ objvalue }}
- {%- endfor %}
- {%- else %}
- {{ name }}: {{ value }}
- {%- endif %}
- {%- endfor %}
- {%- endif %}
-
-
- {% if 'mongo' in cfg_minion -%}
- {%- do default_keys.append('mongo') %}
-
-
- {%- for name, value in cfg_minion['mongo'].items() %}
- mongo.{{ name }}: {{ value }}
- {%- endfor %}
-
- {% if 'alternative.mongo' in cfg_minion -%}
- {%- do default_keys.append('alternative.mongo') %}
- {%- for name, value in cfg_minion['alternative.mongo'].items() %}
- alternative.mongo.{{ name }}: {{ value }}
- {%- endfor %}
- {% endif %}
- {%- endif %}
-
- {%- for configname in cfg_minion %}
- {%- if configname not in reserved_keys and configname not in default_keys %}
- {%- if cfg_minion[configname] is iterable and cfg_minion[configname] is not mapping and cfg_minion[configname] is not string %}
- {{ configname }}:
- {%- for item in cfg_minion[configname] %}
- - {{ item }}
- {%- endfor -%}
- {%- else %}
- {{ configname }}: {{ cfg_minion[configname]|json }}
- {%- endif %}
- {%- endif %}
- {%- endfor %}
|