Skip to content

Commit

Permalink
feat(formula): add metastate per community convention
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Sep 9, 2019
1 parent ec7984c commit a823da6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ Available states

.. contents::
:local:
=======
:local:

``salt``
^^^^^^^^

*Meta-state (This is a state that includes other states)*.

This calls all states which have a corresponding entry in pillar data.

``salt.minion``
---------------
Expand Down
33 changes: 33 additions & 0 deletions salt/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{%- if salt.pillar.get('salt') %}
include:
{%- if salt.pillar.get('pkgrepo') %}
- salt.pkgrepo
{%- endif %}
{%- if salt.pillar.get('salt:salt_formulas') %}
- salt.formulas
{%- endif %}
{%- if salt.pillar.get('salt:master') %}
- salt.master
{%- endif %}
{%- if salt.pillar.get('salt:api') %}
- salt.api
{%- endif %}
{%- if salt.pillar.get('salt:salt_cloud_certs') %}
- salt.cloud
{%- endif %}
{%- if salt.pillar.get('salt:ssh') %}
- salt.ssh
{%- endif %}
{%- if salt.pillar.get('salt:syndic') %}
- salt.syndic
{%- endif %}
{%- if salt.pillar.get('salt:standalone') %}
- salt.standalone
{%- endif %}
{%- if salt.pillar.get('salt:minion') %}
- salt.minion
{%- endif %}
{%- endif %}
4 changes: 4 additions & 0 deletions salt/pkgrepo/init.sls
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
{%- if grains.os_family not in ('MacOS', 'Arch') %}

include:
- .{{ grains['os_family']|lower }}

{%- endif %}

0 comments on commit a823da6

Please sign in to comment.