Class: Ansible::Ruby::Modules::Authorized_key
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Authorized_key
- 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
-
#comment ⇒ Object?
Change the comment on the public key.
-
#exclusive ⇒ :yes, ...
Whether to remove all other non-specified keys from the authorized_keys file.
-
#follow ⇒ :yes, ...
Follow path symlink instead of replacing it.
-
#key ⇒ String
The SSH public key(s), as a string or (since 1.9) url (github.com/username.keys).
-
#key_options ⇒ Array<String>, ...
A string of ssh key options to be prepended to the key in the authorized_keys file.
-
#manage_dir ⇒ :yes, ...
Whether this module should manage the directory of the authorized key file.
-
#path ⇒ String?
Alternate path to the authorized_keys file.
-
#state ⇒ :present, ...
Whether the given key (with the given key_options) should or should not be in the file.
-
#user ⇒ String
The username on the remote host whose authorized_keys file will be modified.
-
#validate_certs ⇒ :yes, ...
This only applies if using a https url as the source of the keys.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#comment ⇒ Object?
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.
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.
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.
47 |
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 47 attribute :follow |
#key ⇒ String
Returns The SSH public key(s), as a string or (since 1.9) url (github.com/username.keys).
16 |
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 16 attribute :key |
#key_options ⇒ Array<String>, ...
Returns 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.
24 |
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 24 attribute :manage_dir |
#path ⇒ String?
Returns 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.
28 |
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 28 attribute :state |
#user ⇒ String
Returns 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).
40 |
# File 'lib/ansible/ruby/modules/generated/system/authorized_key.rb', line 40 attribute :validate_certs |