a guest Aug 19th, 2019 102 Never
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)
RAW Paste Data