Class: Ansible::Ruby::Modules::User

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/system/user.rb

Instance Method Summary collapse

Methods inherited from Base

#to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, #initialize, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#append:yes, ...

Returns If C(yes), will only add groups, not set them to just the list in I(groups).

Returns:

  • (:yes, :no, nil)

    If C(yes), will only add groups, not set them to just the list in I(groups).



37
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 37

attribute :append

#commentString?

Returns Optionally sets the description (aka I(GECOS)) of user account.

Returns:

  • (String, nil)

    Optionally sets the description (aka I(GECOS)) of user account.



14
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 14

attribute :comment

#createhome:yes, ...

Returns Unless set to C(no), a home directory will be made for the user when the account is created or if the home directory does not exist.

Returns:

  • (:yes, :no, nil)

    Unless set to C(no), a home directory will be made for the user when the account is created or if the home directory does not exist.



58
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 58

attribute :createhome

#expiresString?

Returns An expiry time for the user in epoch, it will be ignored on platforms that do not support this. Currently supported on Linux and FreeBSD.

Returns:

  • (String, nil)

    An expiry time for the user in epoch, it will be ignored on platforms that do not support this. Currently supported on Linux and FreeBSD.



108
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 108

attribute :expires

#force:yes, ...

Returns When used with C(state=absent), behavior is as with C(userdel –force).

Returns:

  • (:yes, :no, nil)

    When used with C(state=absent), behavior is as with C(userdel –force).



70
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 70

attribute :force

#generate_ssh_key:yes, ...

Returns Whether to generate a SSH key for the user in question. This will B(not) overwrite an existing SSH key.

Returns:

  • (:yes, :no, nil)

    Whether to generate a SSH key for the user in question. This will B(not) overwrite an existing SSH key.



81
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 81

attribute :generate_ssh_key

#groupString?

Returns Optionally sets the user’s primary group (takes a group name).

Returns:

  • (String, nil)

    Optionally sets the user’s primary group (takes a group name).



29
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 29

attribute :group

#groupsArray<String>, ...

Returns Puts the user in this comma-delimited list of groups. When set to the empty string (‘groups=’), the user is removed from all groups except the primary group.

Returns:

  • (Array<String>, String, nil)

    Puts the user in this comma-delimited list of groups. When set to the empty string (‘groups=’), the user is removed from all groups except the primary group.



33
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 33

attribute :groups

#homeObject?

Returns Optionally set the user’s home directory.

Returns:

  • (Object, nil)

    Optionally set the user’s home directory.



45
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 45

attribute :home

#login_classObject?

Returns Optionally sets the user’s login class for FreeBSD, OpenBSD and NetBSD systems.

Returns:

  • (Object, nil)

    Optionally sets the user’s login class for FreeBSD, OpenBSD and NetBSD systems.



74
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 74

attribute :login_class

#move_home:yes, ...

Returns If set to C(yes) when used with C(home=), attempt to move the user’s home directory to the specified directory if it isn’t there already.

Returns:

  • (:yes, :no, nil)

    If set to C(yes) when used with C(home=), attempt to move the user’s home directory to the specified directory if it isn’t there already.



62
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 62

attribute :move_home

#nameString

Returns Name of the user to create, remove or modify.

Returns:

  • (String)

    Name of the user to create, remove or modify.



10
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 10

attribute :name

#non_unique:yes, ...

Returns Optionally when used with the -u option, this option allows to change the user ID to a non-unique value.

Returns:

  • (:yes, :no, nil)

    Optionally when used with the -u option, this option allows to change the user ID to a non-unique value.



22
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 22

attribute :non_unique

#passwordObject?

Returns Optionally set the user’s password to this crypted value. See the user example in the github examples directory for what this looks like in a playbook. See U(docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module) for details on various ways to generate these password values. Note on Darwin system, this value has to be cleartext. Beware of security issues.

Returns:



51
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 51

attribute :password

#remove:yes, ...

Returns When used with C(state=absent), behavior is as with C(userdel –remove).

Returns:

  • (:yes, :no, nil)

    When used with C(state=absent), behavior is as with C(userdel –remove).



77
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 77

attribute :remove

#seuserObject?

Returns Optionally sets the seuser type (user_u) on selinux enabled systems.

Returns:

  • (Object, nil)

    Optionally sets the seuser type (user_u) on selinux enabled systems.



26
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 26

attribute :seuser

#shellString?

Returns Optionally set the user’s shell.

Returns:

  • (String, nil)

    Optionally set the user’s shell.



41
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 41

attribute :shell

#skeletonObject?

Returns Optionally set a home skeleton directory. Requires createhome option!.

Returns:

  • (Object, nil)

    Optionally set a home skeleton directory. Requires createhome option!



48
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 48

attribute :skeleton

#ssh_key_bitsInteger?

Returns Optionally specify number of bits in SSH key to create.

Returns:

  • (Integer, nil)

    Optionally specify number of bits in SSH key to create.



85
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 85

attribute :ssh_key_bits

#ssh_key_commentString?

Returns Optionally define the comment for the SSH key.

Returns:

  • (String, nil)

    Optionally define the comment for the SSH key.



97
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 97

attribute :ssh_key_comment

#ssh_key_fileString?

Returns Optionally specify the SSH key filename. If this is a relative filename then it will be relative to the user’s home directory.

Returns:

  • (String, nil)

    Optionally specify the SSH key filename. If this is a relative filename then it will be relative to the user’s home directory.



93
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 93

attribute :ssh_key_file

#ssh_key_passphraseObject?

Returns Set a passphrase for the SSH key. If no passphrase is provided, the SSH key will default to having no passphrase.

Returns:

  • (Object, nil)

    Set a passphrase for the SSH key. If no passphrase is provided, the SSH key will default to having no passphrase.



101
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 101

attribute :ssh_key_passphrase

#ssh_key_typeString?

Returns Optionally specify the type of SSH key to generate. Available SSH key types will depend on implementation present on target host.

Returns:

  • (String, nil)

    Optionally specify the type of SSH key to generate. Available SSH key types will depend on implementation present on target host.



89
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 89

attribute :ssh_key_type

#state:present, ...

Returns Whether the account should exist or not, taking action if the state is different from what is stated.

Returns:

  • (:present, :absent, nil)

    Whether the account should exist or not, taking action if the state is different from what is stated.



54
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 54

attribute :state

#system:yes, ...

Returns When creating an account, setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users.

Returns:

  • (:yes, :no, nil)

    When creating an account, setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users.



66
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 66

attribute :system

#uidString?

Returns Optionally sets the I(UID) of the user.

Returns:

  • (String, nil)

    Optionally sets the I(UID) of the user.



18
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 18

attribute :uid

#update_password:always, ...

Returns C(always) will update passwords if they differ. C(on_create) will only set the password for newly created users.

Returns:

  • (:always, :on_create, nil)

    C(always) will update passwords if they differ. C(on_create) will only set the password for newly created users.



104
# File 'lib/ansible/ruby/modules/generated/core/system/user.rb', line 104

attribute :update_password