blob: b358c67d6458ce4bd6a28f11d9c679fc2b92427f [file] [log] [blame]
Zsolt Harasztiec7df102016-05-05 13:34:18 -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 }}"
Scott Baker781d28b2016-11-01 11:01:47 -070012 with_items: "{{ hosts }}"
Zsolt Harasztiec7df102016-05-05 13:34:18 -070013 tags: [common]
14
Zsolt Haraszti06ecaa42016-05-31 16:46:37 -070015- name: Latest apt packages
16 apt:
17 name: "{{ item }}"
Scott Baker781d28b2016-11-01 11:01:47 -070018 with_items: "{{ use_latest_for }}"
Zsolt Haraszti06ecaa42016-05-31 16:46:37 -070019 tags: [common]
20
Zsolt Harasztiec7df102016-05-05 13:34:18 -070021- name: Services are not running
22 service:
23 name: "{{ item }}"
24 state: stopped
25 ignore_errors: yes
Scott Baker781d28b2016-11-01 11:01:47 -070026 with_items: "{{ obsolete_services }}"
Zsolt Harasztiec7df102016-05-05 13:34:18 -070027 tags: [common]
David K. Bainbridge97b3f2f2016-06-16 18:08:49 -070028
29- name: Ensure known_hosts file is absent
30 file:
Andy Bavier99c11d32016-09-14 17:21:20 -040031 path: "/home/vagrant/.ssh/known_hosts"
David K. Bainbridge97b3f2f2016-06-16 18:08:49 -070032 state: absent
33
alshabib18704b02016-09-29 15:58:26 -070034- name: Create .ssh directory
35 file: path={{ ansible_env['PWD'] }}/.ssh state=directory mode=0755
36
David K. Bainbridge97b3f2f2016-06-16 18:08:49 -070037- name: Disable Known Host Checking
38 copy:
39 src: files/ssh_config
Andy Bavier99c11d32016-09-14 17:21:20 -040040 dest: "/home/vagrant/.ssh/config"
Andy Bavier3833dde2016-08-31 16:09:27 -040041 owner: "{{ ansible_env['SUDO_USER'] }}"
42 group: "{{ ansible_env['SUDO_USER'] }}"
David K. Bainbridge97b3f2f2016-06-16 18:08:49 -070043 mode: 0600