| # Copyright (c) 2020 Open Networking Foundation |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at: |
| # |
| # http:#www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| ### BEGIN INIT INFO |
| # Description: |
| # This script executes the main list of tasks, |
| # 1. Copies install_onl.sh, an utility file for upgrade procedure to /tmp directory. |
| # 2. Copied ONL image to /tmp directory. |
| # 3. Upgrade OLT tasks is executed which executes install_onl.sh file on OLT by taking ONL |
| # image as an argument. |
| ### END INIT INFO |
| |
| |
| --- |
| # Copy install_onl.sh script amd ONL image files to /root and provide executable permission |
| - name: copying install_onl.sh file to /tmp |
| copy: src='/etc/ansible/roles/upgrade/files/install_onl.sh' dest='/tmp' mode=0777 |
| |
| - name: copying ONL image to /tmp |
| copy: src='/etc/ansible/roles/upgrade/files/ONL_INSTALLED_INSTALLER' dest='/tmp' mode=0777 |
| |
| # Updgrade OLT |
| - name: Upgrade OLT ... |
| command: sh /tmp/install_onl.sh /tmp/ONL_INSTALLED_INSTALLER |
| register: verify_upgrade |
| failed_when: verify_upgrade.rc != 0 |
| |