summaryrefslogtreecommitdiffstats
path: root/roles/logind/meta
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-07-09 23:20:14 +0200
committerAhmed Abdelhalim <[email protected]>2026-07-10 00:38:48 +0200
commit31ab4af71809028695e747cc717dae0e45a21e8e (patch)
tree0a46b0bbab2ab58a91e29669a9f5519e817d551a /roles/logind/meta
parent1cbb9df950175e698e1edc87953e8f4bfb22b88a (diff)
Extract logind lid configuration into it's own role
Diffstat (limited to 'roles/logind/meta')
-rw-r--r--roles/logind/meta/argument_specs.yml44
-rw-r--r--roles/logind/meta/main.yml18
2 files changed, 62 insertions, 0 deletions
diff --git a/roles/logind/meta/argument_specs.yml b/roles/logind/meta/argument_specs.yml
new file mode 100644
index 00000000..4dca7643
--- /dev/null
+++ b/roles/logind/meta/argument_specs.yml
@@ -0,0 +1,44 @@
+---
+argument_specs:
+ main:
+ options:
+ logind_lid_battery_action:
+ type: "str"
+ description: "HandleLidSwitch — action when lid closed on battery"
+ default: "suspend"
+ choices:
+ - "ignore"
+ - "suspend"
+ - "hibernate"
+ - "hybrid-sleep"
+ - "suspend-then-hibernate"
+ - "lock"
+ - "poweroff"
+ logind_lid_ac_action:
+ type: "str"
+ description: "HandleLidSwitchExternalPower — action when lid closed on AC power"
+ default: "suspend"
+ choices:
+ - "ignore"
+ - "suspend"
+ - "hibernate"
+ - "hybrid-sleep"
+ - "suspend-then-hibernate"
+ - "lock"
+ - "poweroff"
+ logind_idle_action:
+ type: "str"
+ description: "IdleAction — action after idle timeout"
+ default: "suspend"
+ choices:
+ - "ignore"
+ - "suspend"
+ - "hibernate"
+ - "hybrid-sleep"
+ - "suspend-then-hibernate"
+ - "lock"
+ - "poweroff"
+ logind_idle_delay:
+ type: "int"
+ description: "IdleActionSec in seconds (0 disables idle action)"
+ default: 0
diff --git a/roles/logind/meta/main.yml b/roles/logind/meta/main.yml
new file mode 100644
index 00000000..7ab91f4a
--- /dev/null
+++ b/roles/logind/meta/main.yml
@@ -0,0 +1,18 @@
+---
+dependencies:
+ - role: "systemd"
+galaxy_info:
+ author: "a14m"
+ description: "Configure systemd-logind lid switch and idle behavior"
+ license: "MIT"
+ min_ansible_version: "2.18"
+ platforms:
+ - name: "ArchLinux"
+ versions:
+ - "all"
+ - name: "Ubuntu"
+ versions:
+ - "noble"
+ - name: "Debian"
+ versions:
+ - "bookworm"