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 | |
Stephane Barbarie | 2cbffca | 2018-03-26 16:20:03 -0400 | [diff] [blame] | 16 | - name: GlusterFS repository is available |
| 17 | apt_repository: |
| 18 | repo: 'ppa:gluster/glusterfs-3.13' |
| 19 | when: target != "cluster" |
| 20 | tags: [common] |
| 21 | |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 22 | - name: Latest apt packages |
| 23 | apt: |
| 24 | name: "{{ item }}" |
| 25 | with_items: "{{ use_latest_for }}" |
| 26 | when: target != "cluster" |
| 27 | tags: [common] |
| 28 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 29 | #- name: Services are not running |
| 30 | # service: |
| 31 | # name: "{{ item }}" |
| 32 | # state: stopped |
| 33 | # ignore_errors: yes |
| 34 | # with_items: "{{ obsolete_services }}" |
| 35 | # tags: [common] |
Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 36 | |
| 37 | - name: Ensure there is a .ssh directory for /root |
| 38 | file: |
| 39 | path: "{{ ansible_env['HOME'] }}/.ssh" |
| 40 | state: directory |
| 41 | owner: root |
| 42 | group: root |
| 43 | |
| 44 | - name: Ensure known_hosts file is absent |
| 45 | file: |
| 46 | path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts" |
| 47 | state: absent |
| 48 | |
| 49 | - name: Disable Known Host Checking |
| 50 | copy: |
| 51 | src: files/ssh_config |
| 52 | dest: "{{ ansible_env['HOME'] }}/.ssh/config" |
| 53 | owner: root |
| 54 | group: root |
| 55 | mode: 0600 |