Class: Ansible::Ruby::Modules::Htpasswd

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb

Overview

Add and remove username/password entries in a password file using htpasswd. This is used by web servers such as Apache and Nginx for basic authentication.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

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

Constructor Details

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

Instance Method Details

#create:yes, ...

Returns Used with C(state=present). If specified, the file will be created if it does not already exist. If set to “no”, will fail if the file does not exist.

Returns:

  • (:yes, :no, nil)

    Used with C(state=present). If specified, the file will be created if it does not already exist. If set to “no”, will fail if the file does not exist



33
# File 'lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb', line 33

attribute :create

#crypt_scheme:apr_md5_crypt, ...

Returns Encryption scheme to be used. As well as the four choices listed here, you can also use any other hash supported by passlib, such as md5_crypt and sha256_crypt, which are linux passwd hashes. If you do so the password file will not be compatible with Apache or Nginx.

Returns:

  • (:apr_md5_crypt, :des_crypt, :ldap_sha1, :plaintext, nil)

    Encryption scheme to be used. As well as the four choices listed here, you can also use any other hash supported by passlib, such as md5_crypt and sha256_crypt, which are linux passwd hashes. If you do so the password file will not be compatible with Apache or Nginx



25
# File 'lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb', line 25

attribute :crypt_scheme

#nameString

Returns User name to add or remove.

Returns:

  • (String)

    User name to add or remove



17
# File 'lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb', line 17

attribute :name

#passwordString?

Returns Password associated with user.,Must be specified if user does not exist yet.

Returns:

  • (String, nil)

    Password associated with user.,Must be specified if user does not exist yet.



21
# File 'lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb', line 21

attribute :password

#pathString

Returns Path to the file that contains the usernames and passwords.

Returns:

  • (String)

    Path to the file that contains the usernames and passwords



13
# File 'lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb', line 13

attribute :path

#state:present, ...

Returns Whether the user entry should be present or not.

Returns:

  • (:present, :absent, nil)

    Whether the user entry should be present or not



29
# File 'lib/ansible/ruby/modules/generated/web_infrastructure/htpasswd.rb', line 29

attribute :state