--- # Load distribution specific variables - include_vars: "{{ item }}" with_first_found: - "{{ role_path }}/vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ role_path }}/vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" - "{{ role_path }}/vars/{{ ansible_distribution }}.yml" - "{{ role_path }}/vars/{{ ansible_os_family }}.yml" tags: offen # Detect installed version (if any) - block: - import_tasks: ../includes/webapps_set_install_mode.yml vars: - root_dir: "{{ offen_root_dir }}" - version: "{{ offen_version }}" - set_fact: offen_install_mode={{ (install_mode == 'upgrade' and not offen_manage_upgrade) | ternary('none',install_mode) }} - set_fact: offen_current_version={{ current_version | default('') }} tags: offen # Create a random pass for the DB if needed - block: - import_tasks: ../includes/get_rand_pass.yml vars: - pass_file: "{{ offen_root_dir }}/meta/ansible_dbpass" - complex: False - set_fact: offen_db_pass={{ rand_pass }} when: offen_db_pass is not defined tags: offen # Create a random secret if needed - block: - import_tasks: ../includes/get_rand_pass.yml vars: - pass_file: "{{ offen_root_dir }}/meta/ansible_secret" - complex: False - pass_size: 16 - set_fact: offen_secret={{ rand_pass }} when: offen_secret is not defined tags: offen