Subject: [ansible-project] conditional.  when variable in variable

I wish to use a when statement that takes a variable passed in at command
line (user), check it against a variable created with getent: (database:
passwd).  I am doing something wrong.  I think the issue is two fold.  1.  
I think that I am not using my variables right in the when statement.  2.  
In this context, would I need to be pointing to
local_users.ansible_facts.getent_passwd?  or something similar?:

---
- name: Gather local users
  getent:
    database: passwd
  register: local_users

- debug:
    var: local_users
    verbosity: 1

- name: Purge user
  user:
    name: "{{ user }}"
    state: absent
    remove: yes
  when: user in local_users
--
To post to this group, send email to [EMAIL PROTECTED].
  Kai Stian Olstad 2018-07-12, 20:00
  John Harmon 2018-07-12, 20:03
  Brian Coca 2018-07-12, 20:07
  John Harmon 2018-07-12, 20:23
  Brian Coca 2018-07-12, 20:25
  John Harmon 2018-07-12, 20:28