mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 05:41:35 +01:00
feat: dont pre-template nsca server conf pw
This commit is contained in:
@@ -16,7 +16,7 @@ def dump_config(vmList):
|
|||||||
f.write("\n")
|
f.write("\n")
|
||||||
|
|
||||||
# dump ansible
|
# dump ansible
|
||||||
with open("./ansible/files/nsca_server.conf", "w") as f:
|
with open("./ansible/templates/nsca_server.conf", "w") as f:
|
||||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates"))
|
env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath="./templates"))
|
||||||
template = env.get_template("nsca_server.conf.j2")
|
template = env.get_template("nsca_server.conf.j2")
|
||||||
f.write(template.render(vmList=sorted(list(set(filter(lambda x: x.ansible, vmList)))),
|
f.write(template.render(vmList=sorted(list(set(filter(lambda x: x.ansible, vmList)))),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ log_level = 2
|
|||||||
|
|
||||||
{% for vmo in vmList %}
|
{% for vmo in vmList %}
|
||||||
authorize "{{ vmo.hostname }}" {
|
authorize "{{ vmo.hostname }}" {
|
||||||
password = "{{ password }}"
|
password = "{% raw %}{{ nsca_server_password }}{% endraw %}"
|
||||||
hosts = "{{ vmo.hostname }}"
|
hosts = "{{ vmo.hostname }}"
|
||||||
services = {
|
services = {
|
||||||
"*",
|
"*",
|
||||||
|
|||||||
Reference in New Issue
Block a user