Skip to content

feature request: add salt tops External Nodes Classifier #34

Open

Description

@Sjd-Risca

It would be nice if pillarstack could have a top module for generating the top file.

See here for detailed examples.

Here is what varstack does: /usr/lib/python2.7/dist-packages/salt/tops/varstack.py

Activity

  1. Sjd-Risca commented on Jun 30, 2020

    @Sjd-Risca
    Author

    It could be a nice idea.

    At current state I usually circumvent such issue with the following salt/top.sls file:

    {%- set base = salt.pillar.get('tops:base', []) %}
    {%- if base|length > 0 %}
    base:
        '*':
            {%- for role in base %}
            - {{ role }}
            {%- endfor %}
    {% endif %}
    {%- set dev = salt.pillar.get('tops:dev', []) %}
    {%- if dev|length > 0 %}
    dev:
        '*':
            {%- for role in dev %}
            - {{ role }}
            {%- endfor %}
    {% endif %}
    

    Whereas the pillar render to something like:

    tops:
      base:
        - user
        - apache
    user:
      ...
    apache:
      ...
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions