You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
495 B
Python
23 lines
495 B
Python
#!/usr/bin/python
|
|
# I am an Ansible new-style Python module. I modify the process environment and
|
|
# don't clean up after myself.
|
|
|
|
from ansible.module_utils.basic import AnsibleModule
|
|
|
|
import os
|
|
import pwd
|
|
import socket
|
|
import sys
|
|
|
|
|
|
def main():
|
|
module = AnsibleModule(argument_spec={
|
|
'key': {'type': 'str'},
|
|
'val': {'type': 'str'}
|
|
})
|
|
os.environ[module.params['key']] = module.params['val']
|
|
module.exit_json(msg='Muahahaha!')
|
|
|
|
if __name__ == '__main__':
|
|
main()
|