- name: Install {{appname}}
  include_tasks: tasks/install.yml
  vars:
     app: "oracle"

- block:
  - pause:
      prompt: "Please check oracle is normal(such as oracle DB and oracle EM), it will take more than 5 miniutes."
      echo: no  
  - name: Output oracle version
    shell: |
      wget -O /tmp/containers_version.sh https://raw.githubusercontent.com/Websoft9/StackHub/main/scripts/containers_version.sh
      bash /tmp/containers_version.sh
      rm -f /tmp/containers_version.sh
      sleep 20s
  - name: Delete contains and images resources
    shell: |
      docker compose down -v
      docker system prune --all --force
      docker logout container-registry.oracle.com
    args:
      chdir: /data/apps/oracle
  when: oracle_edition == "enterprise"
