How to use the DarwinUser class from the user module?

13 views
Skip to first unread message

Vineet Naik

unread,
Aug 28, 2015, 1:44:01 AM8/28/15
to Ansible Project
Hello,

I am trying to extend a custom role that involves creating and setting up user accounts to work on MacOSX. After looking at the source code of the user module, I found the DarwinUser subclass defined (https://github.com/ansible/ansible-modules-core/blob/devel/system/user.py#L1396). But the main function just initializes an object of the User class. Is it possible to tell the module to use the DarwinUser class instead of User? What's the recommended way to use the subclasses that are defined?

Thanks,
Vineet

Brian Coca

unread,
Aug 28, 2015, 10:19:27 AM8/28/15
to Ansible Project

Vineet Naik

unread,
Aug 30, 2015, 2:08:01 PM8/30/15
to ansible...@googlegroups.com
Ok, just realized that the DarwinUser subclass has been added in relatively newer version of ansible where as we are using an older version in which the subclass doesn't exist which is the reason why the module didn't work automatically.

Thanks.


--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/QFhmtFQjk2g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8nnG_urA72w9r2Hot_QKtY%2B%3DX1eGzkn8_3KoyjYgLELAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
~ Vineet

Reply all
Reply to author
Forward
0 new messages