blob: 42bb2aeda1489d76da9583b38a05c12bd431b912 [file] [log] [blame]
Humera Kouser9c2bd9f2020-09-25 02:41:29 -04001# Copyright (c) 2020 Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at:
6#
7# http:#www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15### BEGIN INIT INFO
16# Description:
17# This script executes the main list of tasks,
18# 1. Copies install_onl.sh, an utility file for upgrade procedure to /tmp directory.
19# 2. Copied ONL image to /tmp directory.
20# 3. Upgrade OLT tasks is executed which executes install_onl.sh file on OLT by taking ONL
21# image as an argument.
22### END INIT INFO
23
24
25---
26# Copy install_onl.sh script amd ONL image files to /root and provide executable permission
27 - name: copying install_onl.sh file to /tmp
28 copy: src='/etc/ansible/roles/upgrade/files/install_onl.sh' dest='/tmp' mode=0777
29
30 - name: copying ONL image to /tmp
31 copy: src='/etc/ansible/roles/upgrade/files/ONL_INSTALLED_INSTALLER' dest='/tmp' mode=0777
32
33# Updgrade OLT
34 - name: Upgrade OLT ...
35 command: sh /tmp/install_onl.sh /tmp/ONL_INSTALLED_INSTALLER
36 register: verify_upgrade
37 failed_when: verify_upgrade.rc != 0
38