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/core/system/authorized_key.rb
Overview
Adds or removes SSH authorized keys for particular user accounts
Instance Method Summary collapse
-
#exclusive ⇒ :yes, ...
Whether to remove all other non-specified keys from the authorized_keys file.
-
#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
#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.
35 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 35 attribute :exclusive |
#key ⇒ String
Returns The SSH public key(s), as a string or (since 1.9) url (github.com/username.keys).
15 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 15 attribute :key |
#key_options ⇒ Array<String>, ...
Returns A string of ssh key options to be prepended to the key in the authorized_keys file.
31 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 31 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.
23 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 23 attribute :manage_dir |
#path ⇒ String?
Returns Alternate path to the authorized_keys file.
19 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 19 attribute :path |
#state ⇒ :present, ...
Returns Whether the given key (with the given key_options) should or should not be in the file.
27 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 27 attribute :state |
#user ⇒ String
Returns The username on the remote host whose authorized_keys file will be modified.
11 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 11 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).
39 |
# File 'lib/ansible/ruby/modules/generated/core/system/authorized_key.rb', line 39 attribute :validate_certs |