12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- ---
- # Fact setting
- # - name: Set default image variables based on deployment type
- # include_vars: "{{ item }}"
- # with_first_found:
- # - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
- # - "default_images.yml"
- - name: Ensure openshift-sdn project exists
- oc_project:
- name: openshift-sdn
- state: present
- node_selector:
- - ""
- - name: Make temp directory for templates
- command: mktemp -d /tmp/console-ansible-XXXXXX
- register: mktemp
- changed_when: False
- - name: Copy web console templates to temp directory
- copy:
- src: "{{ item }}"
- dest: "{{ mktemp.stdout }}/{{ item | basename }}"
- with_fileglob:
- - "files/*.yaml"
- - name: Update the image tag
- yedit:
- src: "{{ mktemp.stdout }}/sdn-images.yaml"
- key: 'tag.from.name'
- # TODO: this should be easier to replace
- value: "{{ osn_image }}:{{ openshift_image_tag }}"
- when: oreg_url is defined
- - name: Ensure the SDN can run privileged
- oc_adm_policy_user:
- namespace: "openshift-sdn"
- resource_kind: scc
- resource_name: privileged
- state: present
- user: "system:serviceaccount:openshift-sdn:sdn"
- - name: Apply the SDN config
- shell: >
- {{ openshift_client_binary }} apply -f {{ mktemp.stdout }}
- - name: Remove temp directory
- file:
- state: absent
- name: "{{ mktemp.stdout }}"
- changed_when: False
|