]> git.phdru.name Git - ansible.git/blobdiff - playbooks/redhat/init-local-phd.yaml
Feat: Rename `*.yml` to `*.yaml`
[ansible.git] / playbooks / redhat / init-local-phd.yaml
diff --git a/playbooks/redhat/init-local-phd.yaml b/playbooks/redhat/init-local-phd.yaml
new file mode 100644 (file)
index 0000000..bbb7958
--- /dev/null
@@ -0,0 +1,27 @@
+- name: Update local user phd
+  hosts: "{{ hosts | default('localhost') }}"
+  gather_facts: false
+  vars:
+    system_groups: root,wheel,adm,disk,cdrom,floppy,audio,video,users,mail,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: Create user phd
+      become: true
+      user:
+        name: phd
+        groups: "{{ system_groups }}"
+    - name: Install X11
+      become: true
+      dnf:
+        name: ['fvwm', 'rxvt-unicode', 'xorg']
+        state: latest
+        update_cache: yes