Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame^] | 1 | --- |
Jonathan Hart | 93956f5 | 2017-08-22 13:12:42 -0700 | [diff] [blame] | 2 | # 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 Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame^] | 16 | - name: Get platform type |
| 17 | slurp: |
| 18 | src: /etc/onl/platform |
| 19 | register: etc_onl_platform |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 20 | |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame^] | 21 | - name: Set platform var |
David K. Bainbridge | f418170 | 2016-06-17 14:44:03 -0700 | [diff] [blame] | 22 | set_fact: |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame^] | 23 | platform: "{{ etc_onl_platform.content | b64decode | trim }}" |
David K. Bainbridge | f418170 | 2016-06-17 14:44:03 -0700 | [diff] [blame] | 24 | |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame^] | 25 | - 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. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 28 | |
Luca Prete | 0a2430f | 2018-02-01 17:17:36 -0800 | [diff] [blame^] | 29 | - name: Manage Accton OLT |
| 30 | include: olt-accton.yml |
| 31 | when: platform in platforms.accton_olts.names |
David K. Bainbridge | 317e7d7 | 2016-05-11 08:31:44 -0700 | [diff] [blame] | 32 | |
Charles Chan | aba1b56 | 2016-08-01 16:33:07 -0700 | [diff] [blame] | 33 | - name: Authorize SSH Key |
| 34 | become: yes |
| 35 | authorized_key: |
| 36 | key={{ pub_ssh_key }} |
| 37 | user=root |
| 38 | state=present |
| 39 | register: sshkey |