Fix airshipctl-roles-test gate job

Due to incorrect processing IP:port pairs using 'regex_replace' filter,
roles-test gate job fails. This patches fixes all the related errors and
CI gate check itself.

Change-Id: Ifd7f890166195df0af9b34e1ccff59b7abd2d9ab
Relates-To: #305
Closes: #305
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit is contained in:
Ruslan Aliev 2020-07-21 11:53:15 -05:00
parent 83a7fbc2d1
commit d21c02c87b
7 changed files with 10 additions and 11 deletions

View File

@ -101,7 +101,7 @@
apache_server_ssl_key_path: "/etc/ssl/private/{{ file_exchanger_name }}.key"
apache_server_ssl_cert_path: "/etc/ssl/certs/{{ file_exchanger_name }}.pem"
apache_server_ssl_cn: "{{ file_exchanger_servername }}"
apache_server_ssl_alt_name: "{{ file_exchanger_ip | map('regex_replace', '(.*)', 'IP:\\1') | list }}"
apache_server_ssl_alt_name: "{{ file_exchanger_ip | map('regex_replace', '^(.*)$', 'IP:\\1') | list }}"
- name: Generate certs for case without alt_names
when: file_exchanger_ip is undefined or file_exchanger_ip == None

View File

@ -3,7 +3,7 @@
{% if file_exchanger_http_port != 80 %}
Listen {{ file_exchanger_http_port }}
{% endif %}
<VirtualHost {{ file_exchanger_ip | default(['*']) | ipwrap | map('regex_replace', '(.*)', '\\1:{}'.format(file_exchanger_http_port)) | list | join(' ') }}>
<VirtualHost {{ file_exchanger_ip | default(['*']) | ipwrap | map('regex_replace', '^(.*)$', '\\1:{}'.format(file_exchanger_http_port)) | list | join(' ') }}>
# Add machine's IP address (use ifconfig command)
ServerName {{ file_exchanger_servername }}

View File

@ -4,7 +4,7 @@
{% if file_exchanger_https_port != 443 %}
Listen {{ file_exchanger_https_port }}
{% endif %}
<VirtualHost {{ file_exchanger_ip | default(['*']) | ipwrap | map('regex_replace', '(.*)', '\\1:{}'.format(file_exchanger_https_port)) | list | join(' ') }}>
<VirtualHost {{ file_exchanger_ip | default(['*']) | ipwrap | map('regex_replace', '^(.*)$', '\\1:{}'.format(file_exchanger_https_port)) | list | join(' ') }}>
# Add machine's IP address (use ifconfig command)
{% if file_exchanger_user is defined and file_exchanger_user != None %}
<Directory /var/www/file_exchanger_cgi-bin/>

View File

@ -56,4 +56,3 @@
service:
name: apache2
state: reloaded

View File

@ -68,7 +68,7 @@
apache_server_ssl_key_path: "/etc/ssl/private/{{ sushy_emulator_frontend_name }}.key"
apache_server_ssl_cert_path: "/etc/ssl/certs/{{ sushy_emulator_frontend_name }}.pem"
apache_server_ssl_cn: "{{ sushy_emulator_frontend_servername }}"
apache_server_ssl_alt_name: "{{ sushy_emulator_frontend_ip | map('regex_replace', '(.*)', 'IP:\\1') | list }}"
apache_server_ssl_alt_name: "{{ sushy_emulator_frontend_ip | map('regex_replace', '^(.*)$', 'IP:\\1') | list }}"
- name: Generate certs for case without alt_names
when: sushy_emulator_frontend_ip is undefined
@ -111,7 +111,7 @@
- name: Check without auth
when: sushy_emulator_frontend_user is undefined
uri:
url: http://{{ sushy_emulator_frontend_servername }}:{{sushy_emulator_frontend_http_port }}/redfish/v1/Systems?format=json
url: http://{{ sushy_emulator_frontend_servername }}:{{ sushy_emulator_frontend_http_port }}/redfish/v1/Systems?format=json
method: GET
return_content: yes
register: sushy_get_result
@ -122,7 +122,7 @@
- name: Check with auth
when: sushy_emulator_frontend_user is defined
uri:
url: http://{{ sushy_emulator_frontend_servername }}:{{sushy_emulator_frontend_http_port }}/redfish/v1/Systems?format=json
url: http://{{ sushy_emulator_frontend_servername }}:{{ sushy_emulator_frontend_http_port }}/redfish/v1/Systems?format=json
url_username: "{{ sushy_emulator_frontend_user[0].username }}"
url_password: "{{ sushy_emulator_frontend_user[0].password }}"
method: GET
@ -134,14 +134,14 @@
- name: Check without auth
when: sushy_emulator_frontend_user is undefined
uri:
url: https://{{ sushy_emulator_frontend_servername }}:{{sushy_emulator_frontend_https_port }}/redfish/v1/Systems?format=json
url: https://{{ sushy_emulator_frontend_servername }}:{{ sushy_emulator_frontend_https_port }}/redfish/v1/Systems?format=json
method: GET
validate_certs: false
return_content: yes
- name: Check with auth
when: sushy_emulator_frontend_user is defined
uri:
url: https://{{ sushy_emulator_frontend_servername }}:{{sushy_emulator_frontend_https_port }}/redfish/v1/Systems?format=json
url: https://{{ sushy_emulator_frontend_servername }}:{{ sushy_emulator_frontend_https_port }}/redfish/v1/Systems?format=json
url_username: "{{ sushy_emulator_frontend_user[0].username }}"
url_password: "{{ sushy_emulator_frontend_user[0].password }}"
validate_certs: false

View File

@ -2,7 +2,7 @@
{% if sushy_emulator_frontend_https_port != 443 %}
Listen {{ sushy_emulator_frontend_https_port }}
{% endif %}
<VirtualHost {{ sushy_emulator_frontend_ip | default(['*']) | ipwrap | map('regex_replace', '(.*)', '\\1:{}'.format(sushy_emulator_frontend_https_port)) | list | join(' ') }}>
<VirtualHost {{ sushy_emulator_frontend_ip | default(['*']) | ipwrap | map('regex_replace', '^(.*)$', '\\1:{}'.format(sushy_emulator_frontend_https_port)) | list | join(' ') }}>
# Add machine's IP address (use ifconfig command)
ServerName {{ sushy_emulator_frontend_servername }}
# Give an alias to to start your website url with

View File

@ -1,7 +1,7 @@
{% if sushy_emulator_frontend_http_port != 80 %}
Listen {{ sushy_emulator_frontend_http_port }}
{% endif %}
<VirtualHost {{ sushy_emulator_frontend_ip | default(['*']) | ipwrap | map('regex_replace', '(.*)', '\\1:{}'.format(sushy_emulator_frontend_http_port)) | list | join(' ') }}>
<VirtualHost {{ sushy_emulator_frontend_ip | default(['*']) | ipwrap | map('regex_replace', '^(.*)$', '\\1:{}'.format(sushy_emulator_frontend_http_port)) | list | join(' ') }}>
# Add machine's IP address (use ifconfig command)
ServerName {{ sushy_emulator_frontend_servername }}
# Give an alias to to start your website url with