Code Review
/
ta
/
cm-plugins.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Correct rpm version
[ta/cm-plugins.git]
/
inventoryhandlers
/
openstack
/
openstackinventory.py
diff --git
a/inventoryhandlers/openstack/openstackinventory.py
b/inventoryhandlers/openstack/openstackinventory.py
index
1f6ee81
..
e3c748e
100644
(file)
--- a/
inventoryhandlers/openstack/openstackinventory.py
+++ b/
inventoryhandlers/openstack/openstackinventory.py
@@
-37,7
+37,8
@@
json_text_setup = """
"keystone_auth_admin_password": "{{ general.openstack_password }}"
},
"sudo_user": "{{ general.admin }}",
"keystone_auth_admin_password": "{{ general.openstack_password }}"
},
"sudo_user": "{{ general.admin }}",
- "sudo_user_password": "{{ general.password }}"
+ "sudo_user_password": "{{ general.password }}",
+ "sudo_user_authorized_keys": [ {% for key in general.admin_authorized_keys %}"{{ key }}"{% if not loop.last %},{% endif %}{% endfor %} ]
}
}
}
}
}
}
@@
-1098,6
+1099,7
@@
class General:
self.admin = None
self.password = None
self.openstack_password = None
self.admin = None
self.password = None
self.openstack_password = None
+ self.admin_authorized_keys = []
class Network:
def __init__(self):
class Network:
def __init__(self):
@@
-1137,6
+1139,7
@@
class Host:
self.hwmgmt_address = None
self.hwmgmt_password = None
self.hwmgmt_user = None
self.hwmgmt_address = None
self.hwmgmt_password = None
self.hwmgmt_user = None
+ self.hwmgmt_priv_level = 'ADMINISTRATOR'
self.mgmt_mac = None
self.is_performance = False
self.os_max_threads = 16
self.mgmt_mac = None
self.is_performance = False
self.os_max_threads = 16
@@
-1427,6
+1430,7
@@
class openstackinventory(cmansibleinventoryconfig.CMAnsibleInventoryConfigPlugin
host.hwmgmt_address = hostsconf.get_hwmgmt_ip(name)
host.hwmgmt_user = hostsconf.get_hwmgmt_user(name)
host.hwmgmt_password = hostsconf.get_hwmgmt_password(name)
host.hwmgmt_address = hostsconf.get_hwmgmt_ip(name)
host.hwmgmt_user = hostsconf.get_hwmgmt_user(name)
host.hwmgmt_password = hostsconf.get_hwmgmt_password(name)
+ host.hwmgmt_priv_level = hostsconf.get_hwmgmt_priv_level(name)
host.mgmt_mac = hostsconf.get_mgmt_mac(name)
host.mgmt_mac = hostsconf.get_mgmt_mac(name)
@@
-1503,7
+1507,8
@@
class openstackinventory(cmansibleinventoryconfig.CMAnsibleInventoryConfigPlugin
self.general.password = usersconf.get_admin_user_password()
caas_conf = self.confman.get_caas_config_handler()
if caas_conf.get_caas_only():
self.general.password = usersconf.get_admin_user_password()
caas_conf = self.confman.get_caas_config_handler()
if caas_conf.get_caas_only():
- self.general.openstack_password =
users
conf.get_admin_password()
+ self.general.openstack_password =
caas_
conf.get_admin_password()
else:
openstackconfighandler = self.confman.get_openstack_config_handler()
self.general.openstack_password = openstackconfighandler.get_admin_password()
else:
openstackconfighandler = self.confman.get_openstack_config_handler()
self.general.openstack_password = openstackconfighandler.get_admin_password()
+ self.general.admin_authorized_keys = usersconf.get_admin_user_authorized_keys()