make the vsg/exampleservice IP address regex to be more specific
Change-Id: I0f7c9a69c0c31d185d1fc641d67536da1b2a96dd
diff --git a/roles/test-exampleservice/tasks/main.yml b/roles/test-exampleservice/tasks/main.yml
index 0be80ca..7462e75 100644
--- a/roles/test-exampleservice/tasks/main.yml
+++ b/roles/test-exampleservice/tasks/main.yml
@@ -29,13 +29,13 @@
- skip_ansible_lint # running a sub job
- name: Get mgmt IP of VM
- shell: bash -c "source ~/admin-openrc.sh; nova interface-list {{ nova_id.stdout }}|grep -o -m 1 172.27.[[:digit:]]*.[[:digit:]]*"
+ shell: bash -c "source ~/admin-openrc.sh; nova interface-list {{ nova_id.stdout }}|grep -o -m 1 '172\.27\.[[:digit:]]*\.[[:digit:]]*'"
register: mgmt_ip
tags:
- skip_ansible_lint # running a sub job
- name: Get public IP of VM
- shell: bash -c "source ~/admin-openrc.sh; nova interface-list {{ nova_id.stdout }}|grep -o -m 1 10.6.[[:digit:]]*.[[:digit:]]*"
+ shell: bash -c "source ~/admin-openrc.sh; nova interface-list {{ nova_id.stdout }}|grep -o -m 1 '10\.6\.[[:digit:]]*\.[[:digit:]]*'"
register: public_ip
tags:
- skip_ansible_lint # running a sub job
diff --git a/roles/test-vsg/tasks/main.yml b/roles/test-vsg/tasks/main.yml
index fd45b52..51028ae 100644
--- a/roles/test-vsg/tasks/main.yml
+++ b/roles/test-vsg/tasks/main.yml
@@ -29,7 +29,7 @@
- skip_ansible_lint # running a sub job
- name: Get mgmt IP of VM
- shell: bash -c "source ~/admin-openrc.sh; nova interface-list {{ nova_id.stdout }}|grep -o -m 1 172.27.[[:digit:]]*.[[:digit:]]*"
+ shell: bash -c "source ~/admin-openrc.sh; nova interface-list {{ nova_id.stdout }}|grep -o -m 1 '172\.27\.[[:digit:]]*\.[[:digit:]]*'"
register: mgmt_ip
tags:
- skip_ansible_lint # running a sub job