David K. Bainbridge | bbab1d0 | 2016-06-02 22:47:59 -0700 | [diff] [blame^] | 1 | - name: Ensure SSH Directory |
| 2 | file: |
| 3 | path: /home/{{ ansible_user }}/.ssh |
| 4 | state: directory |
| 5 | owner: "{{ ansible_user }}" |
| 6 | group: "{{ ansible_user }}" |
| 7 | mode: 0700 |
| 8 | tags: [common] |
| 9 | |
| 10 | - name: Ignore Known Hosts for SSH |
| 11 | copy: |
| 12 | src: files/ssh-config |
| 13 | dest: /home/{{ ansible_user }}/.ssh/config |
| 14 | owner: "{{ ansible_user }}" |
| 15 | group: "{{ ansible_user }}" |
| 16 | mode: 0600 |
| 17 | tags: [common] |
| 18 | |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 19 | - name: JQ is present |
| 20 | apt: |
| 21 | name: jq |
| 22 | force: yes |
| 23 | tags: [common] |
| 24 | |
| 25 | - name: Host is present |
| 26 | lineinfile: |
| 27 | dest: /etc/hosts |
| 28 | regexp: "^{{ item.host_ip }}" |
| 29 | line: "{{ item.host_ip }} {{ item.host_name }}" |
| 30 | with_items: hosts |
| 31 | tags: [common] |
| 32 | |
| 33 | - name: Services are not running |
| 34 | service: |
| 35 | name: "{{ item }}" |
| 36 | state: stopped |
| 37 | ignore_errors: yes |
| 38 | with_items: obsolete_services |
| 39 | tags: [common] |