From e2f84bb9d51c4452b61763857dee14db8bc32824 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 31 Jul 2019 19:05:55 +0300 Subject: [PATCH] Refactor(phd): Merge `create.yml` back into `main.yml` --- playbooks/debian/roles/phd/tasks/create.yml | 18 ------------------ playbooks/debian/roles/phd/tasks/main.yml | 21 +++++++++++++++++++-- 2 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 playbooks/debian/roles/phd/tasks/create.yml diff --git a/playbooks/debian/roles/phd/tasks/create.yml b/playbooks/debian/roles/phd/tasks/create.yml deleted file mode 100644 index dbd4209..0000000 --- a/playbooks/debian/roles/phd/tasks/create.yml +++ /dev/null @@ -1,18 +0,0 @@ -- 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: Add user phd - become: true - user: - name: phd - group: phd - groups: "{{ system_groups }}" diff --git a/playbooks/debian/roles/phd/tasks/main.yml b/playbooks/debian/roles/phd/tasks/main.yml index dfd8780..1ca3a4b 100644 --- a/playbooks/debian/roles/phd/tasks/main.yml +++ b/playbooks/debian/roles/phd/tasks/main.yml @@ -11,8 +11,25 @@ - name: Create and setup user phd block: - - name: Create user phd - import_tasks: create.yml + - 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: Add user phd + become: true + user: + name: phd + group: phd + groups: "{{ system_groups }}" + - name: Upload and extract home archive unarchive: src: ~/archive/STORE/phd/Home/phd.tar.bz2 -- 2.39.5