From 5a574b2d676b2ca8afa6cd705865f2a87b2af19e Mon Sep 17 00:00:00 2001
From: Arthur BOUDREAULT <boudreaultarthur@ik.me>
Date: Fri, 8 Oct 2021 14:17:37 +0200
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8Frefactor:=20changed=20vars=20?=
 =?UTF-8?q?to=20reflect=20new=20variable=20names=20+=20removed=20git=20req?=
 =?UTF-8?q?uirement=20(already=20installed=20with=20git=20role)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 tasks/main.yml | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)

diff --git a/tasks/main.yml b/tasks/main.yml
index b01d51b..9353a8c 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -2,49 +2,48 @@
 - name: Install requirements
   ansible.builtin.apt:
     name:
-      - git
       - dialog
     state: present
 
 - name: Test if Yunohost is already installed
   ansible.builtin.stat: path=/etc/yunohost/installed
-  register: yunohost_file_install
+  register: ynh_file_install
 
-- name: Download install script
+- name: Download Yunohost install script
   ansible.builtin.get_url:
-    url: "{{ yunohost.install_script_url }}"
+    url: "{{ ynh_install_script_url }}"
     dest: /tmp/install_yunohost.sh
     mode: 700
-  when: yunohost_file_install.stat.exists == False
+  when: ynh_file_install.stat.exists == False
 
-- name: Launch script
+- name: Launch Yunohost install script
   ansible.builtin.command: /tmp/install_yunohost.sh -a
-  when: yunohost_file_install.stat.exists == False
+  when: ynh_file_install.stat.exists == False
 
-- name: Launch postinsstall
+- name: Launch Yunohost postinstall
   ansible.builtin.shell: "
     yunohost tools postinstall \
-      --domain {{ yunohost.domain }} \
-      --password {{ yunohost.password }} \
-      {% if yunohost.ignore_dyndns == True %} --ignore-dyndns {% endif %}
+      --domain {{ ynh_main_domain }} \
+      --password {{ ynh_admin_password }} \
+      {% if ynh_ignore_dyndns_server == True %} --ignore-dyndns {% endif %}
       "
-  when: yunohost_file_install.stat.exists == False
+  when: ynh_file_install.stat.exists == False
 
-- name: Create domains
+- name: Create extra domains
   ansible.builtin.include: domains.yml
-  when: yunohost.extra_domains
+  when: ynh_extra_domains
 
-- name: Run diagnosis # Required to install certificates
+- name: Run first Yunohost diagnosis # Required to install certificates
   ansible.builtin.shell: yunohost diagnosis run
 
-- name: Install certificates
+- name: Install domain certificates
   ansible.builtin.shell: yunohost domain cert-install
   changed_when: False
 
-- name: Add users
+- name: Add Yunohost users
   ansible.builtin.include: users.yml
-  when: yunohost.users
+  when: ynh_users
 
-- name: Install apps
+- name: Install Yunohost apps
   ansible.builtin.include: apps.yml
-  when: yunohost.apps
+  when: ynh_apps
-- 
GitLab