Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('file.txt', 'r') as file:
- data_file = file.readlines()
- with open('file.txt', 'w') as file:
- for line in data_file:
- file.writelines([line, 'ansible ALL=(ALL) NOPASSWD:ALL\n']) if line.startswith('root') else file.write(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement