From 07846bb789ab12e323fe4f0d28374ccfd0f0d816 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 18 Jun 2019 03:10:28 +0300 Subject: [PATCH] Add a playbook to init user `phd` Add user `phd`, copy its public ssh key. --- playbooks/debian-init-user-phd.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 playbooks/debian-init-user-phd.yml 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 -- 2.39.5