David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 1 | - name: JQ is present |
| 2 | apt: |
| 3 | name: jq |
| 4 | force: yes |
| 5 | tags: [common] |
| 6 | |
| 7 | - name: Host is present |
| 8 | lineinfile: |
| 9 | dest: /etc/hosts |
| 10 | regexp: "^{{ item.host_ip }}" |
| 11 | line: "{{ item.host_ip }} {{ item.host_name }}" |
David K. Bainbridge | 17248c0 | 2016-08-29 17:04:34 -0700 | [diff] [blame] | 12 | with_items: "{{ hosts }}" |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 13 | tags: [common] |
| 14 | |
David K. Bainbridge | 59bdb54 | 2016-07-01 11:07:45 -0700 | [diff] [blame] | 15 | - name: Latest apt packages |
| 16 | apt: |
| 17 | name: "{{ item }}" |
David K. Bainbridge | 17248c0 | 2016-08-29 17:04:34 -0700 | [diff] [blame] | 18 | with_items: "{{ use_latest_for }}" |
David K. Bainbridge | 59bdb54 | 2016-07-01 11:07:45 -0700 | [diff] [blame] | 19 | tags: [common] |
| 20 | |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 21 | - name: Services are not running |
| 22 | service: |
| 23 | name: "{{ item }}" |
| 24 | state: stopped |
| 25 | ignore_errors: yes |
David K. Bainbridge | 17248c0 | 2016-08-29 17:04:34 -0700 | [diff] [blame] | 26 | with_items: "{{ obsolete_services }}" |
David K. Bainbridge | b541504 | 2016-05-13 17:06:10 -0700 | [diff] [blame] | 27 | tags: [common] |
David K. Bainbridge | 59bdb54 | 2016-07-01 11:07:45 -0700 | [diff] [blame] | 28 | |
| 29 | - name: Ensure SSH Directory |
| 30 | file: |
| 31 | path: /home/{{ ansible_user }}/.ssh |
| 32 | state: directory |
| 33 | owner: "{{ ansible_user }}" |
| 34 | group: "{{ ansible_user }}" |
David K. Bainbridge | 8b17904 | 2016-11-30 15:38:42 -0800 | [diff] [blame] | 35 | mode: "0700" |
David K. Bainbridge | 59bdb54 | 2016-07-01 11:07:45 -0700 | [diff] [blame] | 36 | tags: [common] |
| 37 | |
| 38 | - name: Ensure known_hosts file is absent |
| 39 | file: |
| 40 | path: /home/vagrant/.ssh/known_hosts |
| 41 | state: absent |
| 42 | tags: [common] |
| 43 | |
| 44 | - name: Ignore Known Hosts for SSH |
| 45 | copy: |
| 46 | src: files/ssh-config |
| 47 | dest: /home/{{ ansible_user }}/.ssh/config |
| 48 | owner: "{{ ansible_user }}" |
| 49 | group: "{{ ansible_user }}" |
David K. Bainbridge | 8b17904 | 2016-11-30 15:38:42 -0800 | [diff] [blame] | 50 | mode: "0600" |
David K. Bainbridge | 59bdb54 | 2016-07-01 11:07:45 -0700 | [diff] [blame] | 51 | tags: [common] |
| 52 | |