浏览代码

ensure hosts are on AC power

master
Markus Brechtel 6 年前
父节点
当前提交
7aaac16931
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. +10
    -0
      tasks/ac-power.yaml
  2. +2
    -0
      tasks/main.yaml

+ 10
- 0
tasks/ac-power.yaml 查看文件

@@ -0,0 +1,10 @@
---

- name: ensure acpi tool is installed
apt:
pkg: acpi
- name: ensure host is on AC power
command: acpi -a
register: _acpi_ac_adapter
failed_when: '"off-line" in _acpi_ac_adapter.stdout'
changed_when: false

+ 2
- 0
tasks/main.yaml 查看文件

@@ -1,5 +1,7 @@
---

- import_tasks: ac-power.yaml

- import_role:
name: display_manager
vars:


正在加载...
取消
保存