iam_cert.yml 923 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. - name: upload certificates to AWS IAM
  3. iam_cert23:
  4. state: present
  5. name: "{{ openshift_aws_iam_cert_name }}"
  6. cert: "{{ openshift_aws_iam_cert_path }}"
  7. key: "{{ openshift_aws_iam_cert_key_path }}"
  8. cert_chain: "{{ openshift_aws_iam_cert_chain_path | default(omit) }}"
  9. register: elb_cert_chain
  10. failed_when:
  11. - "'failed' in elb_cert_chain"
  12. - elb_cert_chain.failed
  13. - "'msg' in elb_cert_chain"
  14. - "'already exists and has a different certificate body' in elb_cert_chain.msg"
  15. - "'BotoServerError' in elb_cert_chain.msg"
  16. when:
  17. - openshift_aws_create_iam_cert | bool
  18. - openshift_aws_iam_cert_path != ''
  19. - openshift_aws_iam_cert_key_path != ''
  20. - openshift_aws_elb_cert_arn == ''
  21. - name: set_fact openshift_aws_elb_cert_arn
  22. set_fact:
  23. openshift_aws_elb_cert_arn: "{{ elb_cert_chain.arn }}"
  24. - name: wait for cert to propagate
  25. pause:
  26. seconds: 5
  27. when: elb_cert_chain.changed