blob: b7d5eb265e8634108f909f2d4a19e8c82da3e836 [file] [log] [blame]
- name: JQ is present
apt:
name: jq
force: yes
tags: [common]
- name: Host is present
lineinfile:
dest: /etc/hosts
regexp: "^{{ item.host_ip }}"
line: "{{ item.host_ip }} {{ item.host_name }}"
with_items: "{{ hosts }}"
tags: [common]
- name: Latest apt packages
apt:
name: "{{ item }}"
with_items: "{{ use_latest_for }}"
tags: [common]
- name: Services are not running
service:
name: "{{ item }}"
state: stopped
ignore_errors: yes
with_items: "{{ obsolete_services }}"
tags: [common]
- name: Ensure SSH Directory
file:
path: /home/{{ ansible_user }}/.ssh
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: 0700
tags: [common]
- name: Ensure known_hosts file is absent
file:
path: /home/vagrant/.ssh/known_hosts
state: absent
tags: [common]
- name: Ignore Known Hosts for SSH
copy:
src: files/ssh-config
dest: /home/{{ ansible_user }}/.ssh/config
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: 0600
tags: [common]