]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian-init-local-phd.yml
Feat: Split `debian-init-user-phd` into roles
[ansible.git] / playbooks / debian-init-local-phd.yml
diff --git a/playbooks/debian-init-local-phd.yml b/playbooks/debian-init-local-phd.yml
new file mode 100644 (file)
index 0000000..d71f24f
--- /dev/null
@@ -0,0 +1,21 @@
+- name: Update local user phd
+  hosts: localhost
+  gather_facts: false
+  vars:
+    system_groups: root,adm,disk,cdrom,floppy,sudo,audio,www-data,video,plugdev,staff,users,Debian-exim,fuse,sambashare,bluetooth,davfs2,vboxusers,input
+  tasks:
+    - name: Create system groups
+      become: true
+      group:
+        name: "{{ item }}"
+        system: true
+      loop: "{{ system_groups.split(',') }}"
+    - name: Create group phd
+      become: true
+      group:
+        name: phd
+    - name: user phd
+      become: true
+      user:
+        name: phd
+        groups: "{{ system_groups }}"