--- - name: "set real home path when user is in jail" set_fact: app_user_home: "{{ base_chroot_jail }}/{{ app_user }}/home/{{ app_user }}" when: app_user_chrooted == "yes" tags: - setpath - name: "set user home var " set_fact: app_user_home: "/home/{{ app_user }}" when: app_user_chrooted != "yes" tags: - setpath - name: "set instance root" set_fact: app_instance_root: "{{ app_user_home }}/{{ app_instance_id }}" when: app_user is defined tags: - setpath - name: "set instance root" set_fact: run_user: "{{ app_user }}" when: app_user is defined tags: - setpath - name: "set instance root" set_fact: app_instance_root: "{{ www_root }}/{{ app_instance_id }}" when: app_user is not defined tags: - setpath - name: "set instance root" set_fact: run_user: "root" when: app_user is not defined tags: - setpath - name: "set vars ssl_path" set_fact: ssl_path: "/etc/letsencrypt/live" when: ssl_path is not defined tags: - setpath - import_tasks: install.yml when: app_run in ['install', 'reinstall'] - import_tasks: upgrade.yml when: app_run == 'upgrade' - import_tasks: uninstall.yml when: app_run == 'uninstall' - import_role: name: _app_restore_instance when: app_run == 'restore'