registry_auth.yml 662 B

12345678910111213141516
  1. ---
  2. - name: Check for credentials file for registry auth
  3. stat:
  4. path: "{{ docker_cli_auth_config_path }}/config.json"
  5. when: oreg_auth_user is defined
  6. register: docker_cli_auth_credentials_stat
  7. - name: Create credentials for docker cli registry auth
  8. command: "docker --config={{ docker_cli_auth_config_path }} login -u {{ oreg_auth_user }} -p {{ oreg_auth_password }} {{ oreg_host }}"
  9. register: openshift_docker_credentials_create_res
  10. retries: 3
  11. delay: 5
  12. until: openshift_docker_credentials_create_res.rc == 0
  13. when:
  14. - oreg_auth_user is defined
  15. - (not docker_cli_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool