blob: 39879e939345fe5ff7b80d0c8b9bda61ad0aeba3 [file] [log] [blame]
David K. Bainbridged506aa62016-06-22 16:06:39 -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
13 mode: 0755
14 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
26 mode: 0755
27 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