Ansible user_module
exit with rc: -25
if trying to create user with UID provided from Active Directory (AD) domain controller (DC).
main.yml
- name: Configure local user for example.com
user:
name: example
password: "{{ lookup('file', '/tmp/example_at_host.example.com') }}"
system: yes # Defaults to no
createhome: yes # Defaults to yes
uid: '1234567890' # Default user id of example
group: '1234500513' # Default group "example users"
groups: wheel # Empty by default, here, provide root rights via sudoers wheel
shell: /bin/bash # Defaults to /bin/bash
state: present
when: ansible_domain == "example.com"
tags: install,user
stdout
TASK [Configure local user for example.com] *****************************************************************************
fatal: [host.example.com]: FAILED! => changed=false
msg: ''
name: example
rc: -25
Even if trying to create the user manually on CLI
useradd --system --create-home --uid 1234567890 --gid 1234500513 --groups wheel --shell /bin/bash --comment "Example User" example
it fails.
File size limit exceeded (core dumped)
How to resolve this and get user created with same ID as in AD?