12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- ---
- - name: Check that EFS File System ID is set
- fail: msg='the openshift_provisioners_efs_fsid variable is required'
- when: (openshift_provisioners_efs | bool) and openshift_provisioners_efs_fsid is not defined
- - name: Check that EFS region is set
- fail: msg='the openshift_provisioners_efs_region variable is required'
- when: (openshift_provisioners_efs | bool) and openshift_provisioners_efs_region is not defined
- - name: Check that EFS AWS access key id is set
- fail: msg='the openshift_provisioners_efs_aws_access_key_id variable is required'
- when: (openshift_provisioners_efs | bool) and openshift_provisioners_efs_aws_access_key_id is not defined
- - name: Check that EFS AWS secret access key is set
- fail: msg='the openshift_provisioners_efs_aws_secret_access_key variable is required'
- when: (openshift_provisioners_efs | bool) and openshift_provisioners_efs_aws_secret_access_key is not defined
- - name: Install support
- include_tasks: install_support.yaml
- - name: Install EFS
- include_tasks: install_efs.yaml
- when: openshift_provisioners_efs | bool
- - find: paths={{ mktemp.stdout }}/templates patterns=*.yaml
- register: object_def_files
- changed_when: no
- - slurp: src={{item}}
- register: object_defs
- with_items: "{{object_def_files.files | map(attribute='path') | list | sort}}"
- changed_when: no
- - name: Create objects
- include_tasks: oc_apply.yaml
- vars:
- - kubeconfig: "{{ mktemp.stdout }}/admin.kubeconfig"
- - namespace: "{{ openshift_provisioners_project }}"
- - file_name: "{{ file.source }}"
- - file_content: "{{ file.content | b64decode | from_yaml }}"
- with_items: "{{ object_defs.results }}"
- loop_control:
- loop_var: file
- when: not ansible_check_mode
- - name: Printing out objects to create
- debug: msg={{file.content | b64decode }}
- with_items: "{{ object_defs.results }}"
- loop_control:
- loop_var: file
- when: ansible_check_mode
- - name: Scaling up cluster
- include_tasks: start_cluster.yaml
- when: start_cluster | default(true) | bool
|