Skip to content

Instantly share code, notes, and snippets.

@shirou
Created November 2, 2013 16:29
Show Gist options
  • Save shirou/7280724 to your computer and use it in GitHub Desktop.
Save shirou/7280724 to your computer and use it in GitHub Desktop.
login as ubuntu, do as www
---
- hosts: test
gather_facts: no
remote_user: ubuntu
sudo: yes
tasks:
- name: get id
shell: id
sudo_user: www
register: hoge
- name: debug
debug: msg="{{ hoge.stdout }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment