David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 1 | - 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 |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 21 | copy: |
David K. Bainbridge | d506aa6 | 2016-06-22 16:06:39 -0700 | [diff] [blame] | 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 |
Andy Bavier | 0f07bb3 | 2017-01-17 10:20:26 -0500 | [diff] [blame] | 44 | |
| 45 | - name: Ensure /mnt/onl/data directory present |
| 46 | become: yes |
| 47 | file: |
| 48 | path: /mnt/onl/data |
| 49 | owner: root |
| 50 | group: root |
| 51 | state: directory |