Skip to content

Instantly share code, notes, and snippets.

@alexhayes
Created April 9, 2017 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexhayes/0576d4c1f5eefe5da4d17ce726e83d95 to your computer and use it in GitHub Desktop.
Save alexhayes/0576d4c1f5eefe5da4d17ce726e83d95 to your computer and use it in GitHub Desktop.
Get git version after a executes.
a:
cmd.run:
- name: git pull
- cwd: /foo
b:
cmd.run:
- name: echo {{ salt['git.describe'](target) }}
- require:
- cmd: a
@lorengordon
Copy link

try it like this:

a:
  cmd.run:
    - name: git pull
    - cwd: /foo

b:
  module.run:
    - name: git.describe
    - cwd: {{ target }}
    - require:
      - cmd: a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment