Explorar o código

Correct openshift_release regular expression

Match only versions like:
3.7
3.7.0
3.7.0.0

Avoids matches like:
3.7.0.0.0.0
Russell Teague %!s(int64=7) %!d(string=hai) anos
pai
achega
0858526367
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      roles/openshift_sanitize_inventory/tasks/main.yml

+ 1 - 1
roles/openshift_sanitize_inventory/tasks/main.yml

@@ -47,7 +47,7 @@
 - name: Abort when openshift_release is invalid
   when:
     - openshift_release is defined
-    - not openshift_release | match('\d+(\.\d+){1,3}$')
+    - not openshift_release | match('^\d+(\.\d+){1,3}$')
   fail:
     msg: |-
       openshift_release is "{{ openshift_release }}" which is not a valid version string.