saltstack / saltstack/salt

Relative includes are not working when being called with state.sls <directory>/<slsfile>

Open
#55,255 5 comments 0 reactions 1 assignee View on GitHub

@xeacott is already working on this.

Since Nov 13, 2019.

bug pending-discussion
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

When calling a state with for example salt mx3 state.sls mailserver/postfix relative includes are not working. When called as salt mx3 state.sls mailserver.postfix they do work.

Setup

mailserver/postfix.sls:

include:
  - .vmail_users


# Make sure the postfix and mail-utils package are installed.
postfix_package:
  pkg.installed:
    - names:
      - postfix
      - mailutils

mailserver/vmail_users.sls:

vmail_group:
  group.present:
    - name: vmail
    - gid: 404
Steps to Reproduce Issue

salt mx3 state.sls mailserver/postfix results in:

# salt mx3 state.sls mailserver/postfix
mx3:
    Data failed to compile:
----------
    Specified SLS vmail_users in saltenv base is not available on the salt master or through a configured fileserver

salt mx3 state.sls mailserver.postfix works as expected

Versions Report

Salt Version:
Salt: 2019.2.2

Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.18
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Oct 8 2019, 14:14:10)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: 0.9.0
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: Ubuntu 16.04 xenial
locale: UTF-8
machine: x86_64
release: 4.4.110-mainline-rev1
system: Linux
version: Ubuntu 16.04 xenial

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.