Skip to content

Commit

Permalink
feat(inspec.yml): add depends handling
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Sep 7, 2019
1 parent 3d29fce commit a10e09d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ssf_node_anchors:
excludes: []
includes: []
inspec_yml:
depends: []
summary: >-
Verify that the formula is setup and configured correctly
supports:
Expand Down
13 changes: 13 additions & 0 deletions ssf/files/default/inspec/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ license: Apache-2.0
# yamllint disable-line rule:line-length
{%- endif %}
{{ summary_heading }}{{ suite.inspec_yml.summary }}
{#- Centralise duplication from here and `kitchen.yml` #}
{%- set depends = suite.inspec_yml.depends %}
{%- if depends %}
depends:
{%- for depend in depends %}
- name: {{ depend.name }}
{%- for k, v in depend.items() %}
{%- if k != 'name' %}
{{ k }}: {{ v }}
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- endif %}
supports:
{%- for platform in suite.inspec_yml.supports %}
- platform-name: {{ platform }}
Expand Down
1 change: 1 addition & 0 deletions ssf/files/default/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ suites:
{%- endfor %}
{%- endif %}
{#- dependencies #}
{#- Centralise duplication from here and `inspec.yml` #}
{%- set dependencies = suite.provisioner.dependencies %}
{%- if dependencies %}
dependencies:
Expand Down

0 comments on commit a10e09d

Please sign in to comment.