diff options
author | Georg Pfuetzenreuter | 2023-01-22 14:29:19 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-22 14:34:42 +0100 |
commit | 928809b267a4e6a26006aa56354c32cdd629a98e (patch) | |
tree | 373f4aee208efaebc90465840f4d401f053a1a27 /salt/profile | |
parent | 689eb5c676e7e2860b8a279de962c7cb352e8268 (diff) | |
download | salt-928809b267a4e6a26006aa56354c32cdd629a98e.tar.gz salt-928809b267a4e6a26006aa56354c32cdd629a98e.tar.bz2 salt-928809b267a4e6a26006aa56354c32cdd629a98e.zip |
salt.master: manage extension modules
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'salt/profile')
-rw-r--r-- | salt/profile/salt/master.sls | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/salt/profile/salt/master.sls b/salt/profile/salt/master.sls index 7dc7a31..5c61e06 100644 --- a/salt/profile/salt/master.sls +++ b/salt/profile/salt/master.sls @@ -1,10 +1,39 @@ -{%- set master_pillar = pillar['salt']['master'] -%} +{%- set salt_pillar = pillar['salt'] -%} +{%- set master_pillar = salt_pillar['master'] -%} {%- set redis_config = '/etc/redis/salt.conf' -%} {%- set redis_service = 'redis@salt' -%} +{%- set extmods = salt_pillar['extmods'] -%} +{%- set extmoddir = master_pillar['extension_modules'] -%} include: - salt.master +salt_master_extension_modules_dirs: + file.directory: + - names: + - {{ extmoddir }} + {%- for modtype in extmods %} + - {{ extmoddir }}/{{ modtype }} + {%- endfor %} + - user: root + - group: salt + - mode: 0755 + +salt_master_extension_modules_bins: + file.managed: + - names: + {%- for modtype, modnames in extmods.items() %} + {%- for modname in modnames %} + - {{ extmoddir }}/{{ modtype }}/{{ modname }}: + - source: salt://extmods/{{ modtype }}/{{ modname }} + {%- endfor %} + {%- endfor %} + - user: root + - group: salt + - mode: 0640 + - require: + - file: salt_master_extension_modules_dirs + salt_master_extra_packages: pkg.installed: - names: |