Thanks to visit codestin.com
Credit goes to github.com

Skip to content

windows pkg.install not working with saltenv #38551

@bfilipek

Description

@bfilipek

When I try ro run state.apply with setting saltenv, pkg.install returns:

          ID: install_xyz
    Function: pkg.installed
        Name: xyz
      Result: False
     Comment: Package xyz not found in the repository.
     Started: 07:55:46.113000
    Duration: 78.0 ms
     Changes: 

When i try to install another package using salt windows-test pkg.install npp saltenv=test, it returns:

salt windows-test :
    ----------
    npp:
        Unable to locate package npp

The same situation with other packages. Works well without setting saltenv.

All sls files including xyz.sls are avaiable on minion in directory:
C:\salt\var\cache\salt\minion\files\base\win\repo-ng\salt-winrepo-ng

Setup

install.sls:

{% from 'db2/map.jinja' import files with context %}

xyz_archive:
  archive.extracted:
    - name: 'C:\Temp'
    - if_missing: 'C:\Temp\'
    - source: {{ files.server.archive }}
    - source_hash: md5={{ files.server.md5sum }}
    - trim_output: True
    - archive_format: 'zip'

install_xyz:
  pkg.installed:
    - name: xyz
    - require:
      - C:\Temp\install.cfg

xyz.sls (located in salt-winrepo-ng)

xyz:
  {% for version in '11', 12' %}
  '{{ version }}':
    full_name: XYZ
    reboot: False
    installer: 'C:\\Temp\\setup.exe'
    install_flags: '-u C:\\Temp\\install.cfg'
  {% endfor %}

Versions Report

Salt Version:
           Salt: 2016.11.1
 
Dependency Versions:
           cffi: 0.8.2
       cherrypy: 3.2.2
       dateutil: 1.5
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 0.9.1
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: 1.2.3
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.6 (default, Oct 26 2016, 20:30:19)
   python-gnupg: Not Installed
         PyYAML: 3.10
          PyZMQ: 14.0.1
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
 
System Versions:
           dist: Ubuntu 14.04 trusty
        machine: x86_64
        release: 4.2.0-42-generic
         system: Linux
        version: Ubuntu 14.04 trusty

Metadata

Metadata

Assignees

Labels

bugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions