Why Am I Getting "User does not exist" Error When Using Ansible's User Module With "local: true" Parameter ?

Solution Verified - Updated -

Issue

When creating a new user on the using user module with local:true parameter, the playbook fails with following error.

"msg": "User testuser does not exist.\n"

Environment

Ansible Engine < 2.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content