diff --git a/defaults/main.yml b/defaults/main.yml index 725285b6ad7a5647223b3e861533d607ed003a0a..03687d430b67ede2b0045b5e35c0092f8ac2955c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,6 +23,9 @@ ynh_install_script_url: https://install.yunohost.org ynh_admin_password: MYINSECUREPWD_PLZ_OVERRIDE_THIS +ynh_data_dir: "/data/var/www" +ynh_conf_dir: "/data/etc/yunohost" + # The list of Yunohost domains. ynh_main_domain: domain.tld ynh_extra_domains: null diff --git a/tasks/main.yml b/tasks/main.yml index 048022126a97752ab524ef026f0195147275096f..847c38dec4a10c11620e5fa025557beca5e370aa 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -25,6 +25,23 @@ - dialog state: present +- name: Create data folders + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: 0770 + loop: + - "{{ ynh_data_dir }}" + - "{{ ynh_conf_dir }}" + tags: test + +- name: Create symbolic for Yunohost data directory + ansible.builtin.file: + src: /etc/yunohost + dest: "{{ ynh_data_dir }}/test" + state: link + tags: test + - name: Test if Yunohost is already installed ansible.builtin.stat: path=/etc/yunohost/installed register: ynh_file_install