aws.yml 1.1 KB

123456789101112131415161718192021222324252627
  1. ---
  2. - name: Check that openshift_cluster_autoscaler_aws_key is set
  3. fail:
  4. msg: "openshift_cluster_autoscaler_aws_key is not set"
  5. when: openshift_cluster_autoscaler_aws_key == ""
  6. - name: Check that openshift_cluster_autoscaler_aws_secret_key is set
  7. fail:
  8. msg: "openshift_cluster_autoscaler_aws_secret_key is not set"
  9. when: openshift_cluster_autoscaler_aws_secret_key == ""
  10. - when: openshift_cluster_autoscaler_cloud_provider == 'aws'
  11. block:
  12. - name: laydown the aws-credentials
  13. template:
  14. src: aws-creds.j2
  15. dest: "{{ openshift_cluster_autoscaler_template_location }}/{{ openshift_cluster_autoscaler_aws_creds_name }}"
  16. when: openshift_cluster_autoscaler_state == 'present'
  17. - name: create the aws creds secret
  18. oc_secret:
  19. state: "{{ openshift_cluster_autoscaler_state }}"
  20. name: "{{ openshift_cluster_autoscaler_aws_secret_name }}"
  21. namespace: "{{ openshift_cluster_autoscaler_namespace }}"
  22. files:
  23. - name: creds
  24. path: "{{ openshift_cluster_autoscaler_template_location }}/{{ openshift_cluster_autoscaler_aws_creds_name }}"