Commit Graph

8 Commits

Author SHA1 Message Date
c942425424 try 2026-02-03 12:32:43 +01:00
d629982afb Fix: Robusteres Filtern von Benutzer-Home-Verzeichnissen
- In 'roles/tmux/tasks/main.yml' wurde der Task zur Erstellung der
  'user_home_dirs'-Liste durch eine robustere Methode ersetzt.
  Diese verwendet Jinja2-Filter (, , ),
  um Benutzer anhand ihrer Shell, des Benutzernamens ('root' ausschließen),
  der Definition des Home-Verzeichnisses sowie des Ausschlusses von
  leeren oder nur aus '/' bestehenden Home-Verzeichnissen zu filtern.
- Die redundanten 'when'-Bedingungen im 'Tmux config block' wurden entfernt,
  da die Filterung nun zentral bei der Erstellung der Liste erfolgt.
  Dies sollte das Problem beheben, dass gültige Benutzer übersprungen werden
  und gleichzeitig die Robustheit gegen ungültige Home-Verzeichnisse erhöhen.
2026-02-03 12:26:02 +01:00
0a48fec2bf Fix: Add robust filtering and conditional block for tmux config
- In 'roles/tmux/tasks/main.yml', strengthened the filter for
  creating 'user_home_dirs' to explicitly exclude empty home
  directory paths.
- Reverted 'roles/tmux/tasks/tmux_config.yml' to remove redundant
  conditionals.
- In 'roles/tmux/tasks/main.yml', wrapped the 'include_tasks' for
  'tmux_config.yml' in a block and added a robust 'when' condition
  to prevent execution for 'root' or for invalid home directories.
  This directly addresses the user's request and provides multiple
  layers of protection against the 'chown failed' error.
2026-02-03 12:20:04 +01:00
1213254df3 Fix: Add defensive checks to prevent tmux configuration for invalid users
- Modified 'roles/tmux/tasks/main.yml' to explicitly filter out
  the root directory ('/') as a valid home directory.
- Modified 'roles/tmux/tasks/tmux_config.yml' by adding a conditional
  check () to all tasks. This prevents the
  tasks from running for users with invalid home directories, which
  resolves the 'chown failed' error.
2026-02-03 11:49:23 +01:00
871c7a9f7e Fix: Add robust filtering for user home directories
Modified 'roles/tmux/tasks/main.yml' to prevent invalid home
directories from being added to the 'user_home_dirs' list.

Added checks to ensure that the home directory path is defined
and has a length greater than 1, which excludes both empty paths
and the root directory ('/'). This resolves the 'chown failed'
error that occurred when the playbook was run on a system with
users having invalid home directory entries.
2026-02-03 11:45:18 +01:00
a3091080ed Fix: Exclude root user from tmux configuration
Modified 'roles/tmux/tasks/main.yml' to ensure that the tmux configuration
is not applied to the root user's home directory. This was achieved by
adding a condition to exclude the 'root' user when generating the list
of user home directories.
2026-02-03 11:42:21 +01:00
facb4708e2 added tmux and all 2026-01-05 15:48:01 +01:00
fd00ffff45 first commit 2026-01-05 15:07:59 +01:00