Fixed the state module called in FreeBSD sleep states

This commit is contained in:
Gregory Ballantine 2023-05-02 21:40:30 -06:00
parent 431ac0b0d9
commit 5f9c364c51

View File

@ -2,15 +2,15 @@
{% set settings = system_settings['sleep'] %}
{% if settings.disable %}
# Disable sleep via sysrc
sleep_disable_sysrc:
sysrc.managed:
# Disable sleep via sysctl
sleep_disable_sysctl:
sysctl.present:
- name: 'kern.suspend_blocked'
- value: '1'
{% else %}
# Enable sleep via sysrc
sleep_enable_sysrc:
sysrc.managed:
# Enable sleep via sysctl
sleep_enable_sysctl:
sysctl.present:
- name: 'kern.suspend_blocked'
- value: '0'
{% endif %}