---
# file: main.yml
- hosts: fotk
remote_user: fakesudo
tasks:
- name: create a developer user
user: name={{ user }}
password={{ password }}
Actually this should be possible and I remember I did this a few times during testing. Might be something with your version - or the order does matter, so that the tasks will be executed after the roles.
I would have posted this as a comment, rather than an answer, but I wouldn't be able to give the following example in a comment:
Whatever might be the reason why your task is not executed, you can always separate your playbook into several plays, like so:
---
# file: main.yml
- hosts: fotk
remote_user: fakesudo
tasks:
- name: create a developer user
user: name={{ user }}
password={{ password }}
shell=/bin/bash
generate_ssh_key=yes
state=present
- hosts: fotk
remote_user: fakesudo
roles:
- { role: create_developer_environment, sudo_user: "{{ user }}" }
- { role: vim, sudo_user: "{{ user }}" }