Skip to content

Commit 7c2293c

Browse files
PMM-7: Fix IPV4 plugin (#170)
1 parent 219c86f commit 7c2293c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pmm_qa/percona-distribution-postgresql/tasks/percona-distribution-postgres-patroni-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
community.docker.docker_container_exec:
159159
container: "pdpgsql_pmm_patroni_{{ pg_version }}_1"
160160
command: >
161-
sh -c 'curl --location --insecure -u"admin:{{ admin_password }}" -s --request GET "http://{{ pmm_server_ip }}:{{ '80' if pmm_server_ip is ansible.utils.ipv4 else '8080' }}/v1/management/services" | jq -r ".services[].service_name"'
161+
sh -c 'curl --location --insecure -u"admin:{{ admin_password }}" -s --request GET "http://{{ pmm_server_ip }}:{{ '80' if pmm_server_ip is match('^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}$') else '8080' }}/v1/management/services" | jq -r ".services[].service_name"'
162162
register: pmm_server_services
163163

164164
- name: Display already connected services to pmm server

pmm_qa/percona-distribution-postgresql/tasks/percona-distribution-postgres-replication-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
community.docker.docker_container_exec:
201201
container: "pdpgsql_pmm_replication_{{ pg_version }}_1"
202202
command: >
203-
sh -c 'curl --location --insecure -u"admin:{{ admin_password }}" -s --request GET "http://{{ pmm_server_ip }}:{{ '80' if pmm_server_ip is ansible.utils.ipv4 else '8080' }}/v1/management/services" | jq -r ".services[].service_name"'
203+
sh -c 'curl --location --insecure -u"admin:{{ admin_password }}" -s --request GET "http://{{ pmm_server_ip }}:{{ '80' if pmm_server_ip is match('^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}$') else '8080' }}/v1/management/services" | jq -r ".services[].service_name"'
204204
register: pmm_server_services
205205

206206
- name: Display already connected services to pmm server

pmm_qa/postgresql/postgresql-setup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
community.docker.docker_container_exec:
198198
container: "pgsql_pmm_{{ pg_version }}_1"
199199
command: >
200-
sh -c 'curl --location --insecure -u"admin:{{ admin_password }}" -s --request GET "http://{{ pmm_server_ip }}:{{ '80' if pmm_server_ip is ansible.utils.ipv4 else '8080' }}/v1/management/services" | jq -r ".services[].service_name"'
200+
sh -c 'curl --location --insecure -u"admin:{{ admin_password }}" -s --request GET "http://{{ pmm_server_ip }}:{{ '80' if pmm_server_ip is match('^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}$') else '8080' }}/v1/management/services" | jq -r ".services[].service_name"'
201201
register: pmm_server_services
202202

203203
- name: Display already connected services to pmm server

0 commit comments

Comments
 (0)