X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian-init-user-phd.yml;h=32201c82deed7d5c3cc2579a3a897d3662da72c4;hb=1117903c0c1e56e243f1dc8672e129c047e19901;hp=a41f09b99a46ee513cc177d67948533e93f4baba;hpb=07846bb789ab12e323fe4f0d28374ccfd0f0d816;p=ansible.git diff --git a/playbooks/debian-init-user-phd.yml b/playbooks/debian-init-user-phd.yml index a41f09b..32201c8 100644 --- a/playbooks/debian-init-user-phd.yml +++ b/playbooks/debian-init-user-phd.yml @@ -1,11 +1,13 @@ - name: Create user phd - hosts: all + hosts: "{{ hosts | default('servers') }}" + gather_facts: false 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 @@ -20,3 +22,11 @@ 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