diff --git a/ansible/roles/kolla-build/defaults/main.yml b/ansible/roles/kolla-build/defaults/main.yml index ef6d931c4..b1704105e 100644 --- a/ansible/roles/kolla-build/defaults/main.yml +++ b/ansible/roles/kolla-build/defaults/main.yml @@ -4,7 +4,7 @@ kolla_build_config_path: # Paths to extra kolla configuration files. kolla_build_config_paths_default: - - "{{ role_path }}/templates/" + - "{{ role_path }}/templates" # Paths to extra kolla configuration files. kolla_build_config_paths_extra: [] diff --git a/ansible/roles/kolla-build/tasks/main.yml b/ansible/roles/kolla-build/tasks/main.yml index c9c570bf8..f8efdc055 100644 --- a/ansible/roles/kolla-build/tasks/main.yml +++ b/ansible/roles/kolla-build/tasks/main.yml @@ -5,11 +5,12 @@ repos_yaml_sources: "{{ kolla_build_config_paths | product(['/kolla/repos.yaml', '/kolla/repos.yml']) | map('join') | unique | list }}" - name: Check for the presence of any custom repos.y[a]ml file + delegate_to: localhost stat: path: "{{ item }}" - get_md5: False - get_checksum: False - mime: False + get_md5: false + get_checksum: false + mime: false with_items: "{{ repos_yaml_sources }}" register: repos_yaml_stat @@ -22,17 +23,17 @@ merge_yaml: sources: "{{ repos_yaml_sources }}" dest: "{{ repos_yaml_dest }}" - mode: 0644 + mode: "0644" when: kolla_build_repos_yaml_path is defined - name: Ensure the Kolla build configuration file exists merge_configs: - sources: "{{ kolla_build_config_paths | product(['/kolla/kolla-build.conf']) | map('join') | list }}" + sources: "{{ kolla_build_config_paths | product(['/kolla/kolla-build.conf']) | map('join') | unique | list }}" dest: "{{ kolla_build_config_path }}/kolla-build.conf" - mode: 0644 + mode: "0644" - name: Ensure the Kolla build template overrides file exists template: src: template-override.j2.j2 dest: "{{ kolla_build_config_path }}/template-override.j2" - mode: 0644 + mode: "0644" diff --git a/roles/kayobe-diagnostics/files/get_logs.sh b/roles/kayobe-diagnostics/files/get_logs.sh index 2f8a462a7..be50104de 100644 --- a/roles/kayobe-diagnostics/files/get_logs.sh +++ b/roles/kayobe-diagnostics/files/get_logs.sh @@ -33,8 +33,12 @@ copy_logs() { rm ${LOG_DIR}/previous_kayobe_configs/kolla/config/ironic/ironic-agent.{kernel,initramfs} rm ${LOG_DIR}/previous_kolla_configs/config/ironic/ironic-agent.{kernel,initramfs} fi - cp -rvnL /var/log/* ${LOG_DIR}/system_logs/ + if [[ -d /opt/kayobe/etc/kolla ]]; then + cp -rnL /opt/kayobe/etc/kolla/* ${LOG_DIR}/kolla_build_configs/ + fi + + cp -rvnL /var/log/* ${LOG_DIR}/system_logs/ if [[ -x "$(command -v journalctl)" ]]; then journalctl --no-pager > ${LOG_DIR}/system_logs/syslog.txt diff --git a/roles/kayobe-diagnostics/tasks/pre.yml b/roles/kayobe-diagnostics/tasks/pre.yml index f2f3b14ef..5ef84c877 100644 --- a/roles/kayobe-diagnostics/tasks/pre.yml +++ b/roles/kayobe-diagnostics/tasks/pre.yml @@ -14,6 +14,7 @@ - "kayobe_configs" - "kolla_configs" - "kolla_node_configs" + - "kolla_build_configs" - "system_logs" - "kolla" - "ansible"