Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 1 | - name: JQ is present |
| 2 | apt: |
| 3 | name: jq |
| 4 | force: yes |
Sergio Slobodrian | d24189e | 2017-06-10 23:27:15 -0400 | [diff] [blame] | 5 | when: target != "cluster" |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 6 | tags: [common] |
| 7 | |
| 8 | - name: Host is present |
| 9 | lineinfile: |
| 10 | dest: /etc/hosts |
| 11 | regexp: "^{{ item.host_ip }}" |
| 12 | line: "{{ item.host_ip }} {{ item.host_name }}" |
| 13 | with_items: "{{ hosts }}" |
| 14 | tags: [common] |
| 15 | |
| 16 | - name: Latest apt packages |
| 17 | apt: |
| 18 | name: "{{ item }}" |
| 19 | with_items: "{{ use_latest_for }}" |
| 20 | when: target != "cluster" |
| 21 | tags: [common] |
| 22 | |
| 23 | - name: Services are not running |
| 24 | service: |
| 25 | name: "{{ item }}" |
| 26 | state: stopped |
| 27 | ignore_errors: yes |
| 28 | with_items: "{{ obsolete_services }}" |
| 29 | tags: [common] |
| 30 | |
| 31 | - name: Ensure there is a .ssh directory for /root |
| 32 | file: |
| 33 | path: "{{ ansible_env['HOME'] }}/.ssh" |
| 34 | state: directory |
| 35 | owner: root |
| 36 | group: root |
| 37 | |
| 38 | - name: Ensure known_hosts file is absent |
| 39 | file: |
| 40 | path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts" |
| 41 | state: absent |
| 42 | |
| 43 | - name: Disable Known Host Checking |
| 44 | copy: |
| 45 | src: files/ssh_config |
| 46 | dest: "{{ ansible_env['HOME'] }}/.ssh/config" |
| 47 | owner: root |
| 48 | group: root |
| 49 | mode: 0600 |