Changes between Version 3 and Version 4 of GENIExperimenter/Tutorials/AutomatedTutorialTesting
- Timestamp:
- 09/19/15 21:54:09 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/AutomatedTutorialTesting
v3 v4 1 [[PageOutline]] 2 1 3 = Automated Tutorial Testing with Ansible = 2 4 … … 97 99 }}} 98 100 99 101 == 8. Execute commands as another user == 102 For Ansible > 1.9 you can run a test as another user with become. Couldn't find a way though to initialize the environment of that user (no su -) so try sourcing the .bashrc and .profile (or other environment setting files). Example, run a command as user `hadoop`: 103 {{{ 104 name: verify files 105 become: True 106 become_user: hadoop 107 shell: "cd ~; source ~/.bashrc;..." 108 }}}