refactor(includes): Use relative state include

Allow to rename the formula so it does not collide with others with the same name
(ie, SUSE Manager's)
This commit is contained in:
Robin Schneider 2021-06-14 16:59:19 +02:00 committed by GitHub
parent 364563df4d
commit abe828663e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 21 deletions

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "packages/map.jinja" import packages with context %}
{%- from "./map.jinja" import packages with context %}
{%- set wanted_archives = packages.archives.required.archives %}
{%- do wanted_archives.update( packages.archives.wanted ) %}
@ -10,7 +10,7 @@
{%- set req_packages = packages.pkgs.required.pkgs + packages.archives.pkgs.required %}
include:
- packages.pkgs
- .pkgs
extend:
pkg_req_pkgs:

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "packages/map.jinja" import packages with context %}
{%- from "./map.jinja" import packages with context %}
{%- if grains['os'] == 'Windows' %}

View file

@ -2,12 +2,12 @@
# vim: ft=sls
include:
- packages.pkgs
- packages.remote_pkgs
- packages.pips
- packages.gems
- packages.npms
- packages.archives
- packages.snaps
- packages.golang
- packages.chocolatey
- .pkgs
- .remote_pkgs
- .pips
- .gems
- .npms
- .archives
- .snaps
- .golang
- .chocolatey

View file

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# vim: ft=jinja
{%- import_yaml 'packages/defaults.yaml' as defaults %}
{%- import_yaml 'packages/osfamilymap.yaml' as osfamilymap %}
{%- import_yaml 'packages/osmap.yaml' as osmap %}
{%- import_yaml 'packages/osfingermap.yaml' as osfingermap %}
{%- import_yaml './defaults.yaml' as defaults %}
{%- import_yaml './osfamilymap.yaml' as osfamilymap %}
{%- import_yaml './osmap.yaml' as osmap %}
{%- import_yaml './osfingermap.yaml' as osfingermap %}
{%- set packages = salt['grains.filter_by'](
defaults,

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "packages/map.jinja" import packages with context %}
{%- from "./map.jinja" import packages with context %}
{%- set req_states = packages.npms.required.states %}
{%- set req_pkgs = packages.npms.required.pkgs %}

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "packages/map.jinja" import packages with context %}
{%- from "./map.jinja" import packages with context %}
{%- set req_states = packages.pkgs.required.states %}
{%- set req_packages = packages.pkgs.required.pkgs %}

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "packages/map.jinja" import packages with context %}
{%- from "./map.jinja" import packages with context %}
{%- set wanted_rem_pkgs = packages.remote_pkgs %}

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=sls
{%- from "packages/map.jinja" import packages with context %}
{%- from "./map.jinja" import packages with context %}
# As we are 'extend'ing pkg_req_pkgs and unwanted_pkgs, we need to concatenate
# the attributes correctly (see #17)
@ -17,7 +17,7 @@
### REQ PKGS (without this, SNAPS can fail to install/uninstall)
include:
- packages.pkgs
- .pkgs
{%- if req_states %}
{%- for dep in req_states %}
- {{ dep }}