Merge "Replace occurences of '/' in nodename to something more path friendly"

This commit is contained in:
Zuul 2020-03-20 00:21:51 +00:00 committed by Gerrit Code Review
commit 0a16a6a907
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,4 @@
zuul_site_image_manifest_files: zuul_site_image_manifest_files:
- /etc/dib-builddate.txt - /etc/dib-builddate.txt
- /etc/image-hostname.txt - /etc/image-hostname.txt
validate_host_hostname: "{{ inventory_hostname }}"

View File

@ -13,10 +13,14 @@
setup: setup:
register: setupinfo 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 - name: Write out all ansible variables/facts known for each host
delegate_to: localhost delegate_to: localhost
template: template:
dest: "{{ zuul_info_dir }}/host-info.{{ inventory_hostname }}.yaml" dest: "{{ zuul_info_dir }}/host-info.{{ validate_host_hostname_sanitized }}.yaml"
src: templates/host-info.j2 src: templates/host-info.j2
- name: zuul_debug_info block - name: zuul_debug_info block
@ -31,7 +35,7 @@
- name: Write out all zuul information for each host - name: Write out all zuul information for each host
delegate_to: localhost delegate_to: localhost
template: template:
dest: "{{ zuul_info_dir }}/zuul-info.{{ inventory_hostname }}.txt" dest: "{{ zuul_info_dir }}/zuul-info.{{ validate_host_hostname_sanitized }}.txt"
src: templates/zuul-info.j2 src: templates/zuul-info.j2
when: ansible_python_version is version('2.7', '>=') when: ansible_python_version is version('2.7', '>=')

View File

@ -11,3 +11,4 @@
roles: roles:
- role: validate-host - role: validate-host
zuul_site_traceroute_host: files.openstack.org zuul_site_traceroute_host: files.openstack.org
validate_host_hostname: "abc/123"