Matteo Scandolo | 60b640f | 2017-08-08 13:05:22 -0700 | [diff] [blame] | 1 | |
| 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 | |
| 16 | |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 17 | - name: Ensure Root User |
| 18 | become: yes |
| 19 | user: |
| 20 | name: root |
| 21 | password: '$6$o5YKQzd9CIadXU$KPaV6CcDd1XPr4cO.dRnWnMnrZl9mBEM84Pfhp9b1v6fLWHdoQ1gPJ4qa0lGvxpukcWtWtwiZezi3JWisMd4D.' |
| 22 | |
| 23 | - name: Ensure Directories |
| 24 | become: yes |
| 25 | file: |
| 26 | path: "{{ item }}" |
| 27 | owner: root |
| 28 | group: root |
| 29 | mode: 0755 |
| 30 | state: directory |
| 31 | with_items: |
| 32 | - /mnt/flash2 |
| 33 | - /etc/accton |
| 34 | |
| 35 | - name: Ensure Commands |
| 36 | become: yes |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 37 | copy: |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 38 | src: files/{{ item }} |
| 39 | dest: /usr/bin/{{ item }} |
| 40 | owner: root |
| 41 | group: root |
| 42 | mode: 0755 |
| 43 | with_items: |
| 44 | - persist |
| 45 | - savepersist |
| 46 | |
| 47 | - name: Ensure Root SSH |
| 48 | become: yes |
| 49 | lineinfile: |
| 50 | dest: "/etc/ssh/sshd_config" |
| 51 | regexp: "^PermitRootLogin" |
| 52 | line: "PermitRootLogin yes" |
| 53 | |
| 54 | - name: Ensure SSH Config |
| 55 | become: yes |
| 56 | service: |
| 57 | name: ssh |
| 58 | state: restarted |
| 59 | #failed_when: false |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 60 | |
| 61 | - name: Ensure /mnt/onl/data directory present |
| 62 | become: yes |
| 63 | file: |
| 64 | path: /mnt/onl/data |
| 65 | owner: root |
| 66 | group: root |
| 67 | state: directory |