blob: aa775c135c4bcbf4e998d145ceb4d95cf3721378 [file] [log] [blame]
Zsolt Haraszti3d163532016-09-08 15:57:32 -07001- 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 }}"
Rouzbahan Rashidi-Tabrizi0f7eb2b2016-11-08 12:30:12 -080012 with_items: "{{ hosts }}"
Zsolt Haraszti3d163532016-09-08 15:57:32 -070013 tags: [common]
14
15- name: Latest apt packages
16 apt:
17 name: "{{ item }}"
Rouzbahan Rashidi-Tabrizi0f7eb2b2016-11-08 12:30:12 -080018 with_items: "{{ use_latest_for }}"
Zsolt Haraszti3d163532016-09-08 15:57:32 -070019 tags: [common]
20
21- name: Services are not running
22 service:
23 name: "{{ item }}"
24 state: stopped
25 ignore_errors: yes
Rouzbahan Rashidi-Tabrizi0f7eb2b2016-11-08 12:30:12 -080026 with_items: "{{ obsolete_services }}"
Zsolt Haraszti3d163532016-09-08 15:57:32 -070027 tags: [common]
28
29- name: Ensure known_hosts file is absent
30 file:
Zsolt Haraszti15044082016-10-05 00:18:57 -070031 path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts"
Zsolt Haraszti3d163532016-09-08 15:57:32 -070032 state: absent
33
34- name: Disable Known Host Checking
35 copy:
36 src: files/ssh_config
Zsolt Haraszti15044082016-10-05 00:18:57 -070037 dest: "{{ ansible_env['HOME'] }}/.ssh/config"
Zsolt Haraszti3d163532016-09-08 15:57:32 -070038 owner: "{{ ansible_env['SUDO_USER'] }}"
39 group: "{{ ansible_env['SUDO_USER'] }}"
40 mode: 0600