diff options
author | Georg Pfuetzenreuter | 2023-01-15 09:45:04 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-15 09:45:04 +0100 |
commit | 2b40942a442a0f15b2d75289d4977a114cd81e72 (patch) | |
tree | f82a2d89b523fd9f323297f4b67384b9a722aa77 /salt/profile/matterbridge/files/etc | |
parent | f1a4b0514c148d9b5477f5c2b11938445e4438b1 (diff) | |
download | salt-2b40942a442a0f15b2d75289d4977a114cd81e72.tar.gz salt-2b40942a442a0f15b2d75289d4977a114cd81e72.tar.bz2 salt-2b40942a442a0f15b2d75289d4977a114cd81e72.zip |
Import profiles/roles from salt-devel
- + renaming baseline to common
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'salt/profile/matterbridge/files/etc')
-rw-r--r-- | salt/profile/matterbridge/files/etc/matterbridge/matterbridge.toml.j2 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/salt/profile/matterbridge/files/etc/matterbridge/matterbridge.toml.j2 b/salt/profile/matterbridge/files/etc/matterbridge/matterbridge.toml.j2 new file mode 100644 index 0000000..11204f3 --- /dev/null +++ b/salt/profile/matterbridge/files/etc/matterbridge/matterbridge.toml.j2 @@ -0,0 +1,35 @@ +{%- set header = salt['pillar.get']('managed_header_pound') -%} +{%- set myfqdn = salt['grains.get']('fqdn') -%} +{%- set mypillar = 'profile:matterbridge:instances:' ~ instance ~ ':' -%} +{%- set myaccounts = mypillar ~ 'accounts' -%} +{%- set mygateways = mypillar ~ 'gateways' -%} +{%- set generalopts = ['RemoteNickFormat', 'IgnoreFailureOnStart', 'MessageSplit', 'MediaDownloadSize', 'MediaDownloadPath', 'MediaServerDownload', 'LogFile'] -%} +{%- set accountopts = ['Nick', 'NickServNick', 'NickServPassword', 'Server', 'UseTLS', 'UseSASL', 'Label', 'Charset', 'IgnoreNicks', 'RunCommands', 'UseRelayMsg', 'RemoteNickFormat'] -%} +{{ header }} + +[general] +{% for option in generalopts %} +{%- if salt['pillar.get'](mypillar ~ option, None) != None %} +{{ option }}="{{ salt['pillar.get'](mypillar ~ option) }}" +{%- endif -%} +{%- endfor -%} + +{% for account, config in salt['pillar.get'](myaccounts).items() %} +[{{ config['protocol'] }}.{{ account }}] +{%- for option in accountopts %} +{%- if salt['pillar.get'](myaccounts ~ ':' ~ account ~ ':' ~ option, None) != None %} +{{ option }}="{{ config[option] }}" +{%- endif -%} +{% endfor %} +{% endfor -%} + +{% for gateway, config in salt['pillar.get'](mygateways).items() %} +[[gateway]] +name="{{ gateway }}" +enable=true +{% for account, channel in config.items() %} + [[gateway.inout]] + account="{{ account }}" + channel="{{ channel }}" +{% endfor %} +{%- endfor -%} |