We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baa2eb0 commit 5b92411Copy full SHA for 5b92411
roles/create_VM/tasks/main.yml
@@ -46,8 +46,16 @@
46
value={{ lookup('pipe','pwd') }}/../..
47
48
- name: Obtain the current tag, (or version if untagged) of this repository.
49
- shell: TAG=$(git name-rev HEAD --tags --name-only); if [ "$TAG" == "undefined" ]; then git rev-parse --short HEAD; else echo $TAG; fi
50
- chdir={{ vm_dir }}
+ shell: |
+ TAG=$(git name-rev --tags --name-only HEAD)
51
+ if [ "$(echo $TAG | tr -d [:space:])" == "undefined" ]; then
52
+ git rev-parse --short HEAD
53
+ else
54
+ echo $TAG
55
+ fi
56
+ args:
57
+ chdir: "{{ vm_dir }}"
58
+ executable: /bin/bash
59
register: current_version
60
61
- name: Store this version or tag in a file so that the virtual machine can access it.
0 commit comments