Merge "XenAPI: centralize the facts files"
This commit is contained in:
commit
b6777c983c
@ -736,7 +736,8 @@ xenserver_himn_ip: "169.254.0.1"
|
||||
xenserver_username: "root"
|
||||
xenserver_connect_protocol: "https"
|
||||
# File used to save XenAPI's facts variables formatted as json.
|
||||
xenapi_facts_file: "/etc/kolla/xenapi.json"
|
||||
xenapi_facts_root: "/etc/kolla/xenapi/"
|
||||
xenapi_facts_file: "facts.json"
|
||||
|
||||
#############################################
|
||||
# MariaDB component-specific database details
|
||||
|
@ -149,7 +149,7 @@
|
||||
service_name: "{{ item.key }}"
|
||||
services_need_ml2_conf_ini:
|
||||
- "neutron-openvswitch-agent-xenapi"
|
||||
os_xenapi_variables: "{{ lookup('file', xenapi_facts_file) | from_json }}"
|
||||
os_xenapi_variables: "{{ lookup('file', xenapi_facts_root + '/' + inventory_hostname + '/' + xenapi_facts_file) | from_json }}"
|
||||
merge_configs:
|
||||
sources:
|
||||
- "{{ role_path }}/templates/ml2_conf.ini.j2"
|
||||
|
@ -4,6 +4,22 @@
|
||||
state: present
|
||||
become: True
|
||||
|
||||
- name: Bootstrap XenAPI compute node
|
||||
command: xenapi_bootstrap -i {{ xenserver_himn_ip }} -u {{ xenserver_username }} -p {{ xenserver_password }} -f {{ xenapi_facts_file }}
|
||||
- name: Ensure XenAPI root path
|
||||
file:
|
||||
path: "{{ xenapi_facts_root }}"
|
||||
state: directory
|
||||
mode: "0770"
|
||||
become: True
|
||||
|
||||
- name: Bootstrap XenAPI compute node
|
||||
vars:
|
||||
xenapi_facts_path: "{{ xenapi_facts_root + '/' + xenapi_facts_file }}"
|
||||
command: xenapi_bootstrap -i {{ xenserver_himn_ip }} -u {{ xenserver_username }} -p {{ xenserver_password }} -f {{ xenapi_facts_path }}
|
||||
become: True
|
||||
|
||||
- name: Fetching XenAPI facts file
|
||||
fetch:
|
||||
src: "{{ xenapi_facts_root + '/' + xenapi_facts_file }}"
|
||||
dest: "{{ xenapi_facts_root + '/' + inventory_hostname + '/' }}"
|
||||
flat: yes
|
||||
become: True
|
||||
|
Loading…
Reference in New Issue
Block a user