]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
cephadm: set allow_overwrite at bootstrap step
authoryasinlachiny <yasin.lachiny@gmail.com>
Fri, 17 Dec 2021 23:02:32 +0000 (02:32 +0330)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 16 Feb 2022 11:53:33 +0000 (12:53 +0100)
Signed-off-by: yasinlachiny <yasin.lachiny@gmail.com>
(cherry picked from commit 2a2875847235ac0d1a6e61ecf4a21b45553f38ac)

library/cephadm_bootstrap.py

index 7787d50a140f9b6e186e3a329848761cc90b5c39..a1b7ebfcf64d60880cd8dcf6591cf1a85da079f6 100644 (file)
@@ -81,6 +81,11 @@ options:
             - Manage firewall rules with firewalld.
         required: false
         default: true
+    allow_overwrite:
+        description:
+            - allow overwrite of existing â€“output-* config/keyring/ssh files.
+        required: false
+        default: false
     registry_url:
         description:
             - URL for custom registry.
@@ -100,11 +105,11 @@ options:
         required: false
     ssh_user:
         description:
-            - SSH user used for cephadm ssh to the hosts
+            - SSH user used for cephadm ssh to the hosts.
         required: false
     ssh_config:
         description:
-            - SSH config file path for cephadm ssh client
+            - SSH config file path for cephadm ssh client.
         required: false
 author:
     - Dimitri Savineau <dsavinea@redhat.com>
@@ -147,6 +152,7 @@ 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),
+            allow_overwrite=dict(type='bool', required=False, default=False),
             registry_url=dict(type='str', require=False),
             registry_username=dict(type='str', require=False),
             registry_password=dict(type='str', require=False, no_log=True),
@@ -175,6 +181,7 @@ def main():
     dashboard_password = module.params.get('dashboard_password')
     monitoring = module.params.get('monitoring')
     firewalld = module.params.get('firewalld')
+    allow_overwrite = module.params.get('allow_overwrite')
     registry_url = module.params.get('registry_url')
     registry_username = module.params.get('registry_username')
     registry_password = module.params.get('registry_password')
@@ -214,6 +221,9 @@ def main():
     if not firewalld:
         cmd.append('--skip-firewalld')
 
+    if allow_overwrite:
+        cmd.append('--allow-overwrite')
+
     if registry_url and registry_username and registry_password:
         cmd.extend(['--registry-url', registry_url,
                     '--registry-username', registry_username,