From: Oleg Broytman Date: Tue, 18 Jun 2019 00:10:28 +0000 (+0300) Subject: Add a playbook to init user `phd` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=07846bb789ab12e323fe4f0d28374ccfd0f0d816;p=ansible.git Add a playbook to init user `phd` Add user `phd`, copy its public ssh key. --- diff --git a/playbooks/debian-init-user-phd.yml b/playbooks/debian-init-user-phd.yml new file mode 100644 index 0000000..a41f09b --- /dev/null +++ b/playbooks/debian-init-user-phd.yml @@ -0,0 +1,22 @@ +- name: Create user phd + hosts: all + tasks: + - name: Add user phd + user: + name: phd + group: phd + groups: root,adm,disk,cdrom,www-data,plugdev,staff,users,sudo,Debian-exim,fuse + - name: Create folder ~phd/.ssh + file: + path: ~phd/.ssh + state: directory + owner: phd + group: phd + mode: 0700 + - name: Upload SSH key + copy: + src: ~/.ssh/phd@nb3.pub + dest: ~phd/.ssh/phd@nb3.pub + owner: phd + group: phd + mode: 0700