Browse Source

Add undercloud-key-file and ssh_network options.

To enable the execution via ssh into the Undercloud node it's
required to pass also the ansible_ssh_user private key. This
options is part of the tripleo_common inventory.py, but defaults
to None.
This patch allows to pass this parameter in case it's needed.

Also, this patch allows to pass a different value for the host_network
parameter in TripleoInventory instantiation. Setting it by default to
ctlplane.

Change-Id: Id303f356c1b06906aa5aae43b0032bb80a712508
Related-Bug: #1832932
(cherry picked from commit db30779959)
tags/10.5.1
Jose Luis Franco Arza 1 month ago
parent
commit
83f84fa6cf
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      scripts/tripleo-ansible-inventory

+ 5
- 1
scripts/tripleo-ansible-inventory View File

@@ -57,6 +57,8 @@ opts = [
57 57
     cfg.StrOpt('undercloud-connection', default=inv.UNDERCLOUD_CONNECTION_SSH,
58 58
                help=('Ansible connection to the undercloud, either "local" '
59 59
                      'or "ssh". Defaults to "local".')),
60
+    cfg.StrOpt('undercloud-key-file', default=None),
61
+    cfg.StrOpt('ssh-network', default='ctlplane'),
60 62
     cfg.StrOpt('ansible_python_interpreter', default=None),
61 63
     cfg.BoolOpt('debug', help='Print tracebacks for exceptions')
62 64
 ]
@@ -137,7 +139,9 @@ def main():
137 139
         username=configs.username,
138 140
         ansible_ssh_user=configs.ansible_ssh_user,
139 141
         plan_name=configs.stack or configs.plan,
140
-        ansible_python_interpreter=configs.ansible_python_interpreter)
142
+        ansible_python_interpreter=configs.ansible_python_interpreter,
143
+        undercloud_key_file=configs.undercloud_key_file,
144
+        host_network=configs.ssh_network)
141 145
 
142 146
     if configs.list:
143 147
         try:

Loading…
Cancel
Save