Salt: State 'git.latest' was not found in SLS 'foobar'

Created on 10 Aug 2017  路  3Comments  路  Source: saltstack/salt

Description of Issue/Question

I have found this error since the Saltstack RPMs which are install by salt-bootstrap were updated. I guess they come from the salt repo https://repo.saltstack.com/yum/redhat/7.

[root@ip-172-31-28-194 salt]# salt-call --local state.apply foobar
[ERROR   ] State 'git.latest' was not found in SLS 'foobar'
Reason: 'git' __virtual__ returned False

local:
----------
          ID: git.key
    Function: file.managed
        Name: /tmp/id_rsa
      Result: True
     Comment: File /tmp/id_rsa is in the correct state
     Started: 14:52:06.717942
    Duration: 16.246 ms
     Changes:   
----------
          ID: [email protected]:foo/bar.git
    Function: git.latest
      Result: False
     Comment: State 'git.latest' was not found in SLS 'foobar'
              Reason: 'git' __virtual__ returned False
     Changes:   

Summary for local
------------
Succeeded: 1
Failed:    1
------------
Total states run:     2
Total run time:  16.246 ms

Setup

git.key:
  file.managed:
    - name: /tmp/id_rsa
    - source: salt://git-ssh-keys/id_rsa
    - mode: 400

# Clone the Repo
[email protected]:foo/bar.git:
  git.latest:
    - target: /opt/bar
    - user: root
    - identity: /tmp/id_rsa
    - require:
      - file: git.key

Steps to Reproduce Issue

salt-call --local state.apply fe-core-code-clone

Versions Report

salt-call 2017.7.0 (Nitrogen)
Centos 7

Question

Most helpful comment

Correct, if you run git 2017.7.0 it will install git, and then you will be able to use the git commands.

You will need to yum install -y git for the git module to be available.

you can also run -p git on the bootstrap and it will install the git package for you.

All 3 comments

I don't get the error with git v2016.11.6
I don't get the error with git develop
Interestingly I didn't get the error with git v2017.7.0

It seems that its just the default salt-bootstrap install from the salt repo is broken. All the git versions seem to be testing ok.

Correct, if you run git 2017.7.0 it will install git, and then you will be able to use the git commands.

You will need to yum install -y git for the git module to be available.

you can also run -p git on the bootstrap and it will install the git package for you.

Was this page helpful?
0 / 5 - 0 ratings