blob: 6b7db945553587af64a5ffec55a88160f9662d89 [file] [log] [blame]
Matteo Scandolo60b640f2017-08-08 13:05:22 -07001
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. Bainbridged506aa62016-06-22 16:06:39 -070017- 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 Bavier0f07bb32017-01-17 10:20:26 -050037 copy:
David K. Bainbridged506aa62016-06-22 16:06:39 -070038 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 Bavier0f07bb32017-01-17 10:20:26 -050060
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