blob: efddbf9400adba3cd41b722a5a3da75aeb61817b [file] [log] [blame]
David K. Bainbridge59bdb542016-07-01 11:07:45 -07001- name: Ensure Root User
2 become: yes
3 user:
4 name: root
5 password: '$6$o5YKQzd9CIadXU$KPaV6CcDd1XPr4cO.dRnWnMnrZl9mBEM84Pfhp9b1v6fLWHdoQ1gPJ4qa0lGvxpukcWtWtwiZezi3JWisMd4D.'
6
7- name: Ensure Directories
8 become: yes
9 file:
10 path: "{{ item }}"
11 owner: root
12 group: root
David K. Bainbridge8b179042016-11-30 15:38:42 -080013 mode: "0755"
David K. Bainbridge59bdb542016-07-01 11:07:45 -070014 state: directory
15 with_items:
16 - /mnt/flash2
17 - /etc/accton
18
19- name: Ensure Commands
20 become: yes
21 template:
22 src: files/{{ item }}
23 dest: /usr/bin/{{ item }}
24 owner: root
25 group: root
David K. Bainbridge8b179042016-11-30 15:38:42 -080026 mode: "0755"
David K. Bainbridge59bdb542016-07-01 11:07:45 -070027 with_items:
28 - persist
29 - savepersist
30
31- name: Ensure Root SSH
32 become: yes
33 lineinfile:
34 dest: "/etc/ssh/sshd_config"
35 regexp: "^PermitRootLogin"
36 line: "PermitRootLogin yes"
37
38- name: Ensure SSH Config
39 become: yes
40 service:
41 name: ssh
42 state: restarted
43 #failed_when: false