-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cephadm: set ssh configs at bootstrap step
Add support ssh_user and ssh_config to cephadm bootstrap plugin Signed-off-by: Seena Fallah <[email protected]> (cherry picked from commit ae6be71)
- Loading branch information
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,14 @@ | |
- Manage firewall rules with firewalld. | ||
required: false | ||
default: true | ||
ssh_user: | ||
description: | ||
- SSH user used for cephadm ssh to the hosts | ||
required: false | ||
ssh_config: | ||
description: | ||
- SSH config file path for cephadm ssh client | ||
required: false | ||
author: | ||
- Dimitri Savineau <[email protected]> | ||
''' | ||
|
@@ -135,6 +143,8 @@ def main(): | |
dashboard_password=dict(type='str', required=False, no_log=True), | ||
monitoring=dict(type='bool', required=False, default=True), | ||
firewalld=dict(type='bool', required=False, default=True), | ||
ssh_user=dict(type='str', required=False), | ||
ssh_config=dict(type='str', required=False), | ||
), | ||
supports_check_mode=True, | ||
) | ||
|
@@ -149,6 +159,8 @@ def main(): | |
dashboard_password = module.params.get('dashboard_password') | ||
monitoring = module.params.get('monitoring') | ||
firewalld = module.params.get('firewalld') | ||
ssh_user = module.params.get('ssh_user') | ||
ssh_config = module.params.get('ssh_config') | ||
|
||
startd = datetime.datetime.now() | ||
|
||
|
@@ -182,6 +194,12 @@ def main(): | |
if not firewalld: | ||
cmd.append('--skip-firewalld') | ||
|
||
if ssh_user: | ||
cmd.extend(['--ssh-user', ssh_user]) | ||
|
||
if ssh_config: | ||
cmd.extend(['--ssh-config', ssh_config]) | ||
|
||
if module.check_mode: | ||
exit_module( | ||
module=module, | ||
|