]> git.phdru.name Git - ansible.git/commitdiff
User `phd` playbook: Update groups
authorOleg Broytman <phd@phdru.name>
Fri, 21 Jun 2019 15:43:10 +0000 (18:43 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 16 Jul 2019 18:28:36 +0000 (21:28 +0300)
Set different groups for localhost and servers

playbooks/debian-init-user-phd.yml

index a41f09b99a46ee513cc177d67948533e93f4baba..1012d1db1f3da177607ec08fd6f1defe1be58be0 100644 (file)
@@ -2,10 +2,11 @@
   hosts: all
   tasks:
     - name: Add user phd
+      become: true
       user:
         name: phd
         group: phd
-        groups: root,adm,disk,cdrom,www-data,plugdev,staff,users,sudo,Debian-exim,fuse
+        groups: root,adm,disk,cdrom,floppy,sudo,audio,www-data,video,plugdev,staff,users,Debian-exim,fuse,sambashare,input
     - name: Create folder ~phd/.ssh
       file:
         path: ~phd/.ssh
         owner: phd
         group: phd
         mode: 0700
+- name: Update local user phd
+  hosts: localhost
+  tasks:
+    - name: user phd
+      become: true
+      user:
+        name: phd
+        groups: root,adm,disk,cdrom,floppy,sudo,audio,www-data,video,plugdev,staff,users,Debian-exim,fuse,sambashare,bluetooth,davfs2,vboxusers,input