From c3f7b0355ddf659b79d1746ad28a116e9f04b78d Mon Sep 17 00:00:00 2001
From: therojam <github@therojam.tech>
Date: Sat, 1 May 2021 18:33:45 +0200
Subject: [PATCH] switch -m (mail) was deprecated in favor of -d (--domaim)
 also added example users w/ {{ domain }}

---
 README.md       | 13 +++++++++----
 tasks/users.yml |  2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 9942297..217647d 100644
--- a/README.md
+++ b/README.md
@@ -32,13 +32,18 @@ yunohost:
       args: # Provide here args. Path and domain are mandatory, other args depend of the app (cf manifest.json of app).
         path: /ttrss
         domain: example.com
-  # The list of users.
-  users:
-    - name: user1
+  # The list of frontend users. 
+  users: 
+    - name: user1 # user which uses the default domain for its account
       pass: p@ssw0rd
       firstname: Jane
       lastname: Doe
-      mail: jane.doe@example.com
+      domain: {{ domain }} 
+    - name: user1 # user which uses the first extra_domain for its account
+      pass: p@ssw0rd
+      firstname: Jane
+      lastname: Doe
+      domain: {{ extra_domain.[1] }} 
 ```
 
 Dependencies
diff --git a/tasks/users.yml b/tasks/users.yml
index 910006c..c437088 100644
--- a/tasks/users.yml
+++ b/tasks/users.yml
@@ -12,7 +12,7 @@
     yunohost user create {{ item.name }} \
     -f {{ item.firstname }} \
     -l {{ item.lastname }} \
-    -m {{ item.mail }} \
+    -d {{ item.domain }} \
     -p {{ item.pass }}
   loop: "{{ yunohost.users }}"
   when: item.name not in yunohost_registered_users.users.keys()
-- 
GitLab