25 lines
822 B
Python
25 lines
822 B
Python
# -*- coding: utf-8 -*-
|
|
from setuphelpers import *
|
|
|
|
#reference : https://documentation.wazuh.com/current/installation-guide/wazuh-indexer/step-by-step.html
|
|
|
|
def install():
|
|
install_apt("debconf")
|
|
install_apt("adduser")
|
|
install_apt("procps")
|
|
ip="127.0.0.1"
|
|
#open config.yml
|
|
config_yml = open("config.yml", "r")
|
|
config_content = config_yml.read()
|
|
config_yml.close()
|
|
#replace <indexer-node-ip> <wazuh-manager-ip> <dashboard-node-ip> in config.yml with ip
|
|
config_content = config_content.replace("<indexer-node-ip>", ip)
|
|
config_content = config_content.replace("<wazuh-manager-ip>", ip)
|
|
config_content = config_content.replace("<dashboard-node-ip>", ip)
|
|
#write config.yml
|
|
config_yml = open("config.yml", "w")
|
|
config_yml.write(config_content)
|
|
config_yml.close()
|
|
|
|
|