I have been given the responsibility of configuring multiple servers with identical software installations, but with the functionality of entering specific details such as computer ID, IP address, or domain before building them. To simplify the process, I am looking to automate it as much as possible. As a beginner in Python, I would appreciate any suggestions on how to accomplish this task. I am contemplating the use of machine learning. Thank you for your assistance and time.
Are you saying that the configuration is written in a python file?
If so consider putting the configuration into its own data file.
You can json, inifile or other standard formats for this.
Then your python code does not need editing.
What OS are you using?
You could consider packaging the code so that you only have to install the package.
It is a good idea to put a version into your python code so that when you deploying new versions if is easy to find out what version is installed on each server.
Have you looked into tools such as ansible? They might already do what you want.
Also, perhaps conveniently, Ansible is itself implemented in Python
(though the recipes you supply to it are a combination of YAML and