From 03593b957b78c5d192e095b12c88a37127f1bc8f Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 17 Mar 2017 10:45:55 -0400 Subject: [PATCH] Parse the mercurial revision correctly in setup playbook Originally the value was coming out as: xxxxxx default tip When we want xxxxxx In order for the subsequent revision request to work correctly --- awx/playbooks/project_update.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/playbooks/project_update.yml b/awx/playbooks/project_update.yml index eb09cd3657..c3803c7118 100644 --- a/awx/playbooks/project_update.yml +++ b/awx/playbooks/project_update.yml @@ -160,6 +160,11 @@ scm_version: "{{scm_version|regex_replace('^.*Revision: ([0-9]+).*$', '\\1')}}" when: scm_type == 'svn' + - name: parse hg version string properly + set_fact: + scm_version: "{{scm_version|regex_replace('^([A-Za-z0-9]+).*$', '\\1')}}" + when: scm_type == 'hg' + - name: Repository Version debug: msg="Repository Version {{ scm_version }}" when: scm_version is defined