updated the repo to be in sync with the automation on the cord uber repo
Change-Id: Id8619f662719d73a2ca80cf0cca7f1665fbd267a
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
index 13d39fe..0ad01a7 100644
--- a/ansible/roles/common/tasks/main.yml
+++ b/ansible/roles/common/tasks/main.yml
@@ -1,21 +1,3 @@
-- name: Ensure SSH Directory
- file:
- path: /home/{{ ansible_user }}/.ssh
- state: directory
- owner: "{{ ansible_user }}"
- group: "{{ ansible_user }}"
- mode: 0700
- 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]
-
- name: JQ is present
apt:
name: jq
@@ -30,6 +12,12 @@
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 }}"
@@ -37,3 +25,28 @@
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]
+