]> git.phdru.name Git - ansible.git/commitdiff
Refactor(phd): Merge `create.yml` back into `main.yml`
authorOleg Broytman <phd@phdru.name>
Wed, 31 Jul 2019 16:05:55 +0000 (19:05 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 31 Jul 2019 16:33:57 +0000 (19:33 +0300)
playbooks/debian/roles/phd/tasks/create.yml [deleted file]
playbooks/debian/roles/phd/tasks/main.yml

diff --git a/playbooks/debian/roles/phd/tasks/create.yml b/playbooks/debian/roles/phd/tasks/create.yml
deleted file mode 100644 (file)
index dbd4209..0000000
+++ /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 }}"
index dfd87800724c161c963b389bd628d338e38f9663..1ca3a4b3c8340b70fd436ce2a836328395618a41 100644 (file)
 
 - 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