Hi All, I'm sending the play and role for you to check (see below).
It doesn't work right (shows 'postgres', 'root') with: ansible 1.9 (devel 73f5a1fcdd) last updated 2015/03/19 13:38:54 (GMT +000) lib/ansible/modules/core: (detached HEAD 76198a8223) last updated 2015/03/19 13:39:04 (GMT +000) lib/ansible/modules/extras: (detached HEAD cb848fcd9e) last updated 2015/03/19 13:39:04 (GMT +000) v2/ansible/modules/core: (detached HEAD 34784b7a61) last updated 2015/03/17 12:39:06 (GMT +000) v2/ansible/modules/extras: (detached HEAD 46e316a20a) last updated 2015/03/19 13:39:04 (GMT +000) configured module search path = None It does work correctly (shows 'postgres', 'postgres') with: ansible 1.9 (devel ffb281d96c) last updated 2015/03/19 13:32:20 (GMT +000) lib/ansible/modules/core: (detached HEAD 618806aeeb) last updated 2015/03/19 13:36:08 (GMT +000) lib/ansible/modules/extras: (detached HEAD 945da71ce4) last updated 2015/03/19 13:36:08 (GMT +000) v2/ansible/modules/core: (detached HEAD 34784b7a61) last updated 2015/03/17 12:39:06 (GMT +000) v2/ansible/modules/extras: (detached HEAD 650d740a3a) last updated 2015/03/19 13:36:09 (GMT +000) configured module search path = None --------- test.yml ------ --- - hosts: db_server sudo: yes roles: - { role: test-sudo, sudo_user: postgres } ------------------------------ --------- roles/test-sudo/tasks/main.yml ------- --- - name: First task command: /usr/bin/whoami sudo_user: postgres register: first_task - debug: var=first_task.stdout - name: Second task command: /usr/bin/whoami register: second_task - debug: var=second_task.stdout ------------------------------ Best, Jacek W dniu środa, 18 marca 2015 15:46:14 UTC użytkownik Brian Coca napisał: > > tested with 1.8.4, putting sudo_user on role does not seem to work either. > > -- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/92480504-e6ad-421f-a77b-cd28c8f67ac5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.