|
| 1 | +--- |
| 2 | +# Copyright Red Hat, Inc. |
| 3 | +# All Rights Reserved. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 6 | +# not use this file except in compliance with the License. You may obtain |
| 7 | +# a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | +# License for the specific language governing permissions and limitations |
| 15 | +# under the License. |
| 16 | + |
| 17 | +- name: Customize install_yamls devsetup vars |
| 18 | + when: > |
| 19 | + cifmw_install_yamls_opm_version is defined or |
| 20 | + cifmw_install_yamls_sdk_version is defined or |
| 21 | + cifmw_install_yamls_go_version is defined or |
| 22 | + cifmw_install_yamls_kustomize_version is defined |
| 23 | + block: |
| 24 | + - name: Update opm_version in install_yamls devsetup/vars/default.yaml |
| 25 | + when: cifmw_install_yamls_opm_version is defined |
| 26 | + ansible.builtin.lineinfile: |
| 27 | + path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml" |
| 28 | + regexp: '^opm_version:' |
| 29 | + line: "opm_version: {{ cifmw_install_yamls_opm_version }}" |
| 30 | + state: present |
| 31 | + |
| 32 | + - name: Update sdk_version in install_yamls devsetup/vars/default.yaml |
| 33 | + when: cifmw_install_yamls_sdk_version is defined |
| 34 | + ansible.builtin.lineinfile: |
| 35 | + path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml" |
| 36 | + regexp: '^sdk_version:' |
| 37 | + line: "sdk_version: {{ cifmw_install_yamls_sdk_version }}" |
| 38 | + state: present |
| 39 | + |
| 40 | + - name: Update go_version in install_yamls devsetup/vars/default.yaml |
| 41 | + when: cifmw_install_yamls_go_version is defined |
| 42 | + ansible.builtin.lineinfile: |
| 43 | + path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml" |
| 44 | + regexp: '^go_version:' |
| 45 | + line: "go_version: {{ cifmw_install_yamls_go_version }}" |
| 46 | + state: present |
| 47 | + |
| 48 | + - name: Update kustomize_version in install_yamls devsetup/vars/default.yaml |
| 49 | + when: cifmw_install_yamls_kustomize_version is defined |
| 50 | + ansible.builtin.lineinfile: |
| 51 | + path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml" |
| 52 | + regexp: '^kustomize_version:' |
| 53 | + line: "kustomize_version: {{ cifmw_install_yamls_kustomize_version }}" |
| 54 | + state: present |
0 commit comments