question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Require a relative sls file

See original GitHub issue

Ref. #5098

It looks like the require statement takes an absolute path to the required sls file. It would be cool if it could also support relative sls files, e.g.:

include:
  - .local

somename:
  - somemodule:somefunction
      - require:
          sls: .local

Today (0.17.5) the last require statement would have to read sls: path.to.here.local

Issue Analytics

  • State:open
  • Created 10 years ago
  • Reactions:6
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

11reactions
ekristencommented, Apr 30, 2017

I’ve recently run into this problem. Big +1 to supporting relative requires for sls files.

2reactions
mallniyacommented, May 24, 2018

As a workaround one can use slspath variable:

somename:
  - somemodule:somefunction
      - require:
          sls: {{ slspath }}.local
Read more comments on GitHub >

github_iconTop Results From Across the Web

Include and Exclude - Salt Project Documentation
Salt SLS files can include other SLS files and exclude SLS files that have been otherwise included. This allows for an SLS file...
Read more >
Dealing with relative paths in saltstack for state files and for ...
I want to use relative paths when including sls files. This approach works when including state files but does not work when including...
Read more >
Relative paths in SLS files (include and source) - Google Groups
Is there any way to specify relarive paths in these two cases ? I have searched the online documentation and found nothing about...
Read more >
Include and Exclude - Read the Docs
Salt sls files can include other sls files and exclude sls files that have been otherwise included. This allows for an sls file...
Read more >
SLS Structure - idem
Include# · Directories are dot delimited and relative to the directory of the current file. · The final entry in a dot delimited...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found