ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit e5c211a89f6657b0a79474fa29e1adb49a237908
parent d191f05307c1b45b3399d2323213364698c1e362
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 6 May 2021 14:31:36 +0200

roles/common/user: hash passwords based on system hostname
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/roles/common/tasks/users.yml b/roles/common/tasks/users.yml
@@ -13,7 +13,7 @@
     group: "{{ item.name }}"
     groups: "{{ item.groups | default() }}"
     shell: "{{ item.shell | default('/bin/sh') }}"
-    password: "{{item.password | password_hash('sha512', 'uD7ieghugeigh4eisoimoa3iushaeshechoonaequah5eiquerohph9paexai7oh') }}"
+    password: "{{item.password | password_hash('sha512', 65534 | random(seed=inventory_hostname) | string) }}"
   when: item.name != 'root'
   loop: "{{ system.users }}"