docker_sanity.yml 763 B

12345678910111213141516171819
  1. ---
  2. # Sanity checks to ensure the role will complete and provide helpful error
  3. # messages for common problems.
  4. - name: Error out if Docker pre-installed but too old
  5. fail:
  6. msg: "Docker {{ curr_docker_version.stdout }} is installed, but >= {{ l_required_docker_version }} is required."
  7. when:
  8. - not (curr_docker_version is skipped)
  9. - curr_docker_version.stdout != ''
  10. - curr_docker_version.stdout is version_compare(l_required_docker_version, '<')
  11. - not (docker_version is defined)
  12. - name: Error out if requested Docker is too old
  13. fail:
  14. msg: "Docker {{ docker_version }} requested, but >= {{ l_required_docker_version }} is required."
  15. when:
  16. - docker_version is defined
  17. - docker_version is version_compare(l_required_docker_version, '<')