Commit graph

43 commits

Author SHA1 Message Date
Peter Hall
ae67002c15 Fix "TypeError: group id must be integer" if groupid passed in for group
key
2014-07-15 11:16:47 +10:00
Yann Coleu
f378ed643c Add primary group in the first user module doc example 2014-06-02 14:32:52 +02:00
Michael Scherer
4ed4bfff90 Do not fail if we try to generate a ssh key for a user without being root
If we try to use the user module without being root, it fail on RHEL/Fedora
because usermod --help cannot be run. The root cause is lack of permission
due to EAL4+ certification, as seen in shadow-utils changelo.

So if we cannot run it, assume there is no append. It doesn't matter
much since we will not be able to run usermod at all with or without the
option.
2014-04-28 12:29:57 +02:00
Hernandes B. de Sousa
780b5e0bbf Add missing info for the append option
Both 'default' and 'choices' options were missing at the documentation.
2014-04-16 01:22:12 -03:00
Jonathan Davila
a90aa46ed2 Added example demonstrating other functionality 2014-04-11 11:14:40 -04:00
David Fox
01acd73e30 Modified library/system/user so that password change date is set on Solaris when updating password 2014-03-22 15:12:56 -04:00
James Cammarata
08fca488f3 Use the no-user-groups option (-N) for useradd in the user module
If no group was specified, but a group by the same name as the user
exists, an error was raised in the situation where USERGROUPS_ENAB is
enabled in /etc/login.defs (which is the case for almost every major
linux distro). In this case, the user will be put in group 100 (which
is usually the "users" group on those same distros). This is currently
only done in the base class, as the issue may not exist on other
platforms like AIX or the BSDs.

Fixes #6210
2014-02-28 11:46:27 -06:00
James Cammarata
8aec47af89 Merge branch 'usermod_fix' of https://github.com/tknguyen79/ansible into tknguyen79-usermod_fix
Conflicts:
	library/system/user
2014-02-24 23:38:51 -06:00
Sean Chittenden
c892f51002 Fix broken behavior when removing all auxiliary groups from a user
(e.g. 'groups=' in the user module).
2014-02-10 13:08:53 -08:00
Aaron Lindsay
931f8e4c5b Add move_home option to user module 2014-01-29 14:10:26 -05:00
Thoai Nguyen
220b0f87d9 reorder usermod options 2014-01-22 15:27:00 -05:00
jctanner
da9cd8e018 Merge pull request #5490 from rgbj/devel
user module/OpenBSD: using login_class always makes status 'changed'
2014-01-14 14:44:51 -08:00
Joshua Lund
e0a720b8b2 Improved the documentation for password generation 2014-01-07 18:20:39 -07:00
rgbj
fa5a448983 On OpenBSD, make user module status 'changed' only if necessary when using 'login_class' parameter 2014-01-03 15:41:12 +01:00
jeromew
5413ee9431 user module: force= and remove= should not be mutually exclusive 2013-12-05 17:07:24 -05:00
James Tanner
3bb1a263cf Fixes #5169 Evaluate check_mode in the user module SunOS class 2013-12-05 00:44:55 -05:00
James Tanner
38edad70ac Fixes #5023 Convert all modules to use new snippet import pattern 2013-12-02 15:11:23 -05:00
Michael DeHaan
4c35b7f380 There's a cleaner way to do this, commit to module formatter pending.
Revert "No longer need to reference 'version_added' in docs for these, as this was quite a while ago."

This reverts commit ff0a41d446.
2013-11-27 21:23:03 -05:00
Michael DeHaan
9e4d71203d No longer need to reference 'version_added' in docs for these, as this was quite a while ago. 2013-11-27 21:19:32 -05:00
James Tanner
486d248401 Fixes #5010 Add user to all defined supplementary groups 2013-11-25 14:56:46 -05:00
Michael DeHaan
a6aeb12c8c Merge pull request #4560 from tronner/issue4461
Fix illegal set operation in FreeBSD section of user module.
2013-10-26 11:31:20 -07:00
James Tanner
54781bdfe1 Fixes #4554 Enumerate user homedir if not passed as an argument 2013-10-17 13:15:32 -04:00
Thomas Ronner
3b45cb366f Fix illegal set operation in FreeBSD section of user module. 2013-10-17 15:02:23 +00:00
James Tanner
798dba436a Fixes #4350 Create homedirectory if create=yes and directory is missing 2013-10-16 20:08:41 -04:00
James Tanner
74833f730b Fixes #4312 for older versions of usermod which do not have --append 2013-10-11 09:10:46 -04:00
Michael DeHaan
beae21dd40 Remove examples of module antipattern of setting the choices array for boolean types. 2013-10-11 08:45:13 -04:00
Michael DeHaan
d1b9ca4427 Add documentation about how passwords are generated. 2013-10-08 08:36:48 -04:00
Matt Warren
f40a1e0eae addresses https://github.com/ansible/ansible/issues/4371 - adding -m to home directory modification 2013-10-07 10:47:12 -04:00
Raul Melo
b0ffba472f Fix issue 3908. There was some ilegal operations over the sets 2013-08-27 17:07:42 +02:00
rishid
fea38f44ac Verify groups string is not empty before trying add user to groups 2013-08-01 21:19:11 -04:00
Michael DeHaan
517c318989 Merge pull request #3470 from langemeijer/devel
Only append non_unique parameter if a uid is provided as well to user module
2013-07-20 09:11:52 -07:00
Casper Langemeijer
8727f0ce11 Only append non_unique parameter if a uid is provided as well 2013-07-08 11:46:38 +02:00
Brian Coca
b494d6d2ae updated module docs to reflect 'correct' on_create vs on_creation
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-06-30 20:32:05 -04:00
Michael DeHaan
3840c608da Resolve docs conflict. 2013-06-16 22:48:11 -04:00
Michael DeHaan
4a7f0eeccc Fix merge conflict. 2013-06-16 22:47:29 -04:00
Jan-Piet Mens
3404a0fc16 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00
trbs
a31ba582b4 Add support for Open and NetBSD platforms for user and group modules, including a new login_class parameter for FreeBSD, OpenBSD and NetBSD. 2013-05-31 20:53:37 -04:00
Michael DeHaan
10c905e3e2 Remove debug statement in previous patch. 2013-05-31 17:13:54 -04:00
trbs
1f673450cd Fix for #3062 additional groups should only be added once.
Also consolidated duplicate groups code into one get_groups_set() method.
Removed unused call to user_group_membership.
Removed sorting operations on set functions cause sets are inherently unordered.
Minor style improvements to match the rest of the code.

The new function will make the order of group names passed to the system command less determistic.
Which was already the case for modify_user_usermod() but not for other methods.
It will also strip out duplicate group names automatically which was not always the case previously.
2013-05-30 19:18:18 -04:00
Scott Sturdivant
ffb50dfb34 Fixes #2924: User creation always reports 'changed' 2013-05-23 13:43:23 -06:00
madema
973eb69911 -o and -r option don't exist on AIX 2013-05-16 14:30:42 +02:00
lonerr
2a8ef8a87c Fixed errors in FreeBSD user manipulations. 2013-05-08 13:03:18 +04:00
Michael DeHaan
cd97a4cb14 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Renamed from user (Browse further)