
This is pretty trivial, but consistency is probably better in this regard and it does guide you to writing a sentence that is human parsable, which is the point of it. Change-Id: Iaab9bb6aec0ad0f1d3cae10364c1f1b37d02801e
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
- name: Define zuul_info_dir fact
|
|
set_fact:
|
|
zuul_info_dir: "{{ zuul.executor.log_root }}/zuul-info"
|
|
|
|
- name: Ensure Zuul Ansible directory exists
|
|
delegate_to: localhost
|
|
run_once: true
|
|
file:
|
|
path: "{{ zuul_info_dir }}"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Collect information about the host
|
|
setup:
|
|
register: setupinfo
|
|
|
|
- name: Sanitize hostname
|
|
set_fact:
|
|
validate_host_hostname_sanitized: "{{ validate_host_hostname | replace('/', '_') }}"
|
|
|
|
- name: Write out all ansible variables/facts known for each host
|
|
delegate_to: localhost
|
|
template:
|
|
dest: "{{ zuul_info_dir }}/host-info.{{ validate_host_hostname_sanitized }}.yaml"
|
|
src: templates/host-info.j2
|
|
mode: 0644
|
|
|
|
- name: Run zuul_debug_info and collect output
|
|
block:
|
|
- name: Collect information about zuul worker
|
|
zuul_debug_info:
|
|
ipv4_route_required: "{{ zuul_site_ipv4_route_required | default(false) }}"
|
|
ipv6_route_required: "{{ zuul_site_ipv6_route_required | default(false) }}"
|
|
image_manifest: "{{ zuul_site_image_manifest | default(omit) }}"
|
|
image_manifest_files: "{{ zuul_site_image_manifest_files | default(omit) }}"
|
|
traceroute_host: "{{ zuul_site_traceroute_host | default(omit) }}"
|
|
register: zdi
|
|
|
|
- name: Write out all zuul information for each host
|
|
delegate_to: localhost
|
|
template:
|
|
dest: "{{ zuul_info_dir }}/zuul-info.{{ validate_host_hostname_sanitized }}.txt"
|
|
src: templates/zuul-info.j2
|
|
mode: 0644
|
|
|
|
when:
|
|
- ansible_os_family != "Windows"
|
|
- ansible_python_version is version('2.7', '>=')
|