Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Uyuni:Master
proxy-salt-broker-image
uyuni-configure.py
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File uyuni-configure.py of Package proxy-salt-broker-image
#!/usr/bin/python3 # pylint: disable=invalid-name """Configure script for Uyuni proxy Salt broker container.""" import re import yaml # read from file with open("/etc/uyuni/config.yaml", encoding="utf-8") as source: config = yaml.safe_load(source) # write to file with open("/etc/rhn/rhn.conf", "w", encoding="utf-8") as dest: dest.write(f"rhn_parent={config['server']}") # read to existing config file with open("/etc/salt/broker", "r+", encoding="utf-8") as config_file: file_content = config_file.read() # make sure to send logs to stdout/stderr instead to file file_content = re.sub(r"log_to_file: .*", "log_to_file: 0", file_content) # writing back the content config_file.seek(0, 0) config_file.write(file_content) config_file.truncate()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor