How to trace the user module

16 views
Skip to first unread message

Cev Ing

unread,
Jul 31, 2017, 11:15:54 AM7/31/17
to Ansible Project
From time to time I have the situation, that the user module ties to change somthing, but I have no idea what. And when I proceed to run Ansible some change gets done, but I have no idea what might be different after the change. The user module does not seem to support the diff option. How can I analyse what the user module tries to change?

Adrian Likins

unread,
Aug 2, 2017, 10:42:29 AM8/2/17
to ansible...@googlegroups.com
The docs at http://docs.ansible.com/ansible/latest/user_module.html don't mention it, but the user module does
return some info, so you can register its results and display it with debug.

Example playbook:

---
-
  hosts: localhost
  gather_facts: false
  tasks:
    - name: ensure a user exists
      user:
        name: adrian
        state: present
      register: user_result

    - name: show user_result
      debug:
        var: user_result


On Mon, Jul 31, 2017 at 11:15 AM, Cev Ing <cev...@gmail.com> wrote:
From time to time I have the situation, that the user module ties to change somthing, but I have no idea what. And when I proceed to run Ansible some change gets done, but I have no idea what might be different after the change. The user module does not seem to support the diff option. How can I analyse what the user module tries to change?

--
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+unsubscribe@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/ea0ab656-0a8d-41cb-bc3a-30dbce838609%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages