Skip to content

Commit

Permalink
refactor(ng/init.sls): use grains.get to detect containers
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Nov 1, 2019
1 parent dd2a1d1 commit 10c70c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ntp/ng/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ ntpd_conf:
{% set service_state = service.get(ntp.settings.ntpd) %}
{# Do not attempt to run the service in a container where the service is configured with #}
{# `ConditionVirtualization=!container` or similar (e.g. via. `kitchen-salt`) #}
{% if grains.os_family in ['Suse'] and salt['config.get']('virtual_subtype', '') in ['Docker'] %}
{% if grains.os_family in ['Suse'] and
salt['grains.get']('virtual_subtype', '') in ['Docker', 'LXC', 'kubernetes', 'libpod'] %}
{% set service_state = 'dead' %}
{% endif %}
ntpd:
Expand Down

0 comments on commit 10c70c9

Please sign in to comment.