- name: Create temp dir file: path: "{{ tmp_dir }}" state: directory - name: "Install Flutter" become: yes unarchive: src: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_{{ flutter.version }}-stable.tar.xz" dest: "{{ tmp_dir }}" remote_src: yes - name: get folder name shell: ls "{{ tmp_dir }}" register: dir_name - name: Copy to final directory become: yes command: "cp -ra {{ tmp_dir }}/{{ dir_name.stdout }} {{ flutter.dir }}" - name: Remove temp directory become: yes file: path: "{{ tmp_dir }}" state: absent - name: Create symbolic link for flutter become: yes file: src: "{{ flutter.dir }}/bin/flutter" dest: "/usr/local/bin/flutter" state: link - name: Create symbolic link for dart become: yes file: src: "{{ flutter.dir }}/bin/dart" dest: "/usr/local/bin/dart" state: link - name: Set flutter android sdk dir shell: cmd: flutter config --android-sdk {{ android.dir }}