Class: Ansible::Ruby::Modules::Authorized_key

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

Overview

Adds or removes SSH authorized keys for particular user accounts

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

#commentObject?

Returns Change the comment on the public key. Rewriting the comment is useful in cases such as fetching it from GitHub or GitLab.,If no comment is specified, the existing comment will be kept.

Returns:

  • (Object, nil)

    Change the comment on the public key. Rewriting the comment is useful in cases such as fetching it from GitHub or GitLab.,If no comment is specified, the existing comment will be kept.



44
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 44

attribute :comment

#exclusive:yes, ...

Returns Whether to remove all other non-specified keys from the authorized_keys file. Multiple keys can be specified in a single C(key) string value by separating them by newlines.,This option is not loop aware, so if you use C(with_) , it will be exclusive per iteration of the loop, if you want multiple keys in the file you need to pass them all to C(key) in a single batch as mentioned above.

Returns:

  • (:yes, :no, nil)

    Whether to remove all other non-specified keys from the authorized_keys file. Multiple keys can be specified in a single C(key) string value by separating them by newlines.,This option is not loop aware, so if you use C(with_) , it will be exclusive per iteration of the loop, if you want multiple keys in the file you need to pass them all to C(key) in a single batch as mentioned above.



36
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 36

attribute :exclusive

#follow:yes, ...

Returns Follow path symlink instead of replacing it.

Returns:

  • (:yes, :no, nil)

    Follow path symlink instead of replacing it



47
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 47

attribute :follow

#keyString

Returns The SSH public key(s), as a string or (since 1.9) url (github.com/username.keys).

Returns:



16
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 16

attribute :key

#key_optionsArray<String>, ...

Returns A string of ssh key options to be prepended to the key in the authorized_keys file.

Returns:

  • (Array<String>, String, nil)

    A string of ssh key options to be prepended to the key in the authorized_keys file



32
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 32

attribute :key_options

#manage_dir:yes, ...

Returns Whether this module should manage the directory of the authorized key file. If set, the module will create the directory, as well as set the owner and permissions of an existing directory. Be sure to set C(manage_dir=no) if you are using an alternate directory for authorized_keys, as set with C(path), since you could lock yourself out of SSH access. See the example below.

Returns:

  • (:yes, :no, nil)

    Whether this module should manage the directory of the authorized key file. If set, the module will create the directory, as well as set the owner and permissions of an existing directory. Be sure to set C(manage_dir=no) if you are using an alternate directory for authorized_keys, as set with C(path), since you could lock yourself out of SSH access. See the example below.



24
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 24

attribute :manage_dir

#pathString?

Returns Alternate path to the authorized_keys file.

Returns:

  • (String, nil)

    Alternate path to the authorized_keys file



20
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 20

attribute :path

#state:present, ...

Returns Whether the given key (with the given key_options) should or should not be in the file.

Returns:

  • (:present, :absent, nil)

    Whether the given key (with the given key_options) should or should not be in the file



28
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 28

attribute :state

#userString

Returns The username on the remote host whose authorized_keys file will be modified.

Returns:

  • (String)

    The username on the remote host whose authorized_keys file will be modified



12
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 12

attribute :user

#validate_certs:yes, ...

Returns This only applies if using a https url as the source of the keys. If set to C(no), the SSL certificates will not be validated.,This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.,Prior to 2.1 the code worked as if this was set to C(yes).

Returns:

  • (:yes, :no, nil)

    This only applies if using a https url as the source of the keys. If set to C(no), the SSL certificates will not be validated.,This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.,Prior to 2.1 the code worked as if this was set to C(yes).



40
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 40

attribute :validate_certs