Created
August 26, 2015 00:46
-
-
Save cjauvin/b156773f25a67c7246e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Run whoami to get ssh user | |
command: whoami | |
register: whoami_output | |
- name: Set user fact | |
set_fact: | |
user: "{{ whoami_output.stdout }}" | |
- name: test it! | |
debug: msg="{{ user }}" # should be vagrant on a VM, or your remote user for whatever else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment