---

- block:
    - import_tasks: ../includes/webapps_set_install_mode.yml
      vars:
        - root_dir: "{{ itop_root_dir }}"
        - version: "{{ itop_version }}"
    - set_fact: itop_install_mode={{ (install_mode == 'upgrade' and not itop_manage_upgrade) | ternary('none',install_mode) }}
    - set_fact: itop_current_version={{ current_version | default('') }}
  tags: itop

- when: itop_db_pass is not defined
  block:
    - import_tasks: ../includes/get_rand_pass.yml
      vars:
        - pass_file: "{{ itop_root_dir }}/meta/ansible_dbpass"
    - set_fact: itop_db_pass={{ rand_pass }}
  tags: itop

