blob: 03cd283c9d8a530ccdac37dc4872113f63baae3c [file] [log] [blame]
Luca Prete0a2430f2018-02-01 17:17:36 -08001---
Jonathan Hart93956f52017-08-22 13:12:42 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Luca Prete0a2430f2018-02-01 17:17:36 -080016- name: Get platform type
17 slurp:
18 src: /etc/onl/platform
19 register: etc_onl_platform
David K. Bainbridge317e7d72016-05-11 08:31:44 -070020
Luca Prete0a2430f2018-02-01 17:17:36 -080021- name: Set platform var
David K. Bainbridgef4181702016-06-17 14:44:03 -070022 set_fact:
Luca Prete0a2430f2018-02-01 17:17:36 -080023 platform: "{{ etc_onl_platform.content | b64decode | trim }}"
David K. Bainbridgef4181702016-06-17 14:44:03 -070024
Luca Prete0a2430f2018-02-01 17:17:36 -080025- name: Manage OFDPA
26 include: ofdpa.yml platform="{{ platform }}"
27 when: platform in platforms.accton_switches.names or platform in platforms.quanta_switches.names
David K. Bainbridge317e7d72016-05-11 08:31:44 -070028
Luca Prete0a2430f2018-02-01 17:17:36 -080029- name: Manage Accton OLT
30 include: olt-accton.yml
31 when: platform in platforms.accton_olts.names
David K. Bainbridge317e7d72016-05-11 08:31:44 -070032
Charles Chanaba1b562016-08-01 16:33:07 -070033- name: Authorize SSH Key
34 become: yes
35 authorized_key:
36 key={{ pub_ssh_key }}
37 user=root
38 state=present
39 register: sshkey