18 lines
448 B
Python
18 lines
448 B
Python
|
|
if __name__ == '__main__':
|
|
print('Running setup config for PIs')
|
|
|
|
ip = input('Enter the IP of the PI:')
|
|
user = input('Enter the user of the PI:')
|
|
|
|
with open('inventory.ini', 'r') as inventory:
|
|
content = inventory.read()
|
|
content = content.replace('{{USER}}', user)
|
|
content = content.replace('{{IP}}', ip)
|
|
|
|
with open('inventory.ini', 'w') as inventory:
|
|
inventory.write(content)
|
|
|
|
print(f'Changed inventory.ini content with: {content}')
|
|
|