more isolated production tinkering

see: #5903
see: #6507
This commit is contained in:
Ryan Petrello
2017-06-28 18:53:13 -04:00
parent 79c19d14e5
commit 405c01a847
5 changed files with 4 additions and 4 deletions

View File

@@ -1,24 +0,0 @@
import os
import stat
from ansible.module_utils.basic import AnsibleModule
def main():
module = AnsibleModule(
argument_spec={
'path': {'required': True, 'type': 'str'},
'content': {'required': True, 'type': 'str'}
},
supports_check_mode=False
)
path = module.params['path']
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR)
with open(path, 'w') as fifo:
fifo.write(module.params['content'])
module.exit_json(dest=path, changed=True)
if __name__ == '__main__':
main()