From d7b94b88827875a25443454e9f2bd8b82fb99df9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 1 Jun 2020 02:20:45 +0200 Subject: add cpu-microcode role --- roles/core/cpu-microcode/tasks/Debian.yml | 16 ++++++++++++++++ roles/core/cpu-microcode/tasks/OpenBSD.yml | 2 ++ roles/core/cpu-microcode/tasks/main.yml | 12 ++++++++++++ roles/installer/openbsd/base/defaults/main.yml | 4 ++-- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 roles/core/cpu-microcode/tasks/Debian.yml create mode 100644 roles/core/cpu-microcode/tasks/OpenBSD.yml create mode 100644 roles/core/cpu-microcode/tasks/main.yml (limited to 'roles') diff --git a/roles/core/cpu-microcode/tasks/Debian.yml b/roles/core/cpu-microcode/tasks/Debian.yml new file mode 100644 index 00000000..9f6a27f4 --- /dev/null +++ b/roles/core/cpu-microcode/tasks/Debian.yml @@ -0,0 +1,16 @@ +--- +- name: check if non-free and contrib apt component is enabled for debian + when: 'ansible_distribution == "Debian"' + assert: + msg: "On Debian microcode-update packages are in non-free - please enable it (and contrib) using 'apt_repo_components'" + that: + - apt_repo_components is defined + - "'contrib' in apt_repo_components" + - "'non-free' in apt_repo_components" + +- name: install microcode-update packages + apt: + name: + - intel-microcode + - amd64-microcode + state: present diff --git a/roles/core/cpu-microcode/tasks/OpenBSD.yml b/roles/core/cpu-microcode/tasks/OpenBSD.yml new file mode 100644 index 00000000..7d6bbc08 --- /dev/null +++ b/roles/core/cpu-microcode/tasks/OpenBSD.yml @@ -0,0 +1,2 @@ +--- +## TODO: What do we need to do here? diff --git a/roles/core/cpu-microcode/tasks/main.yml b/roles/core/cpu-microcode/tasks/main.yml new file mode 100644 index 00000000..410a07cb --- /dev/null +++ b/roles/core/cpu-microcode/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- name: load os/distrubtion/version specific tasks + vars: + params: + files: + - "{{ ansible_distribution_release }}.yml" + - "{{ ansible_distribution }}.yml" + - "{{ ansible_os_family }}.yml" + loop: "{{ q('first_found', params) }}" + loop_control: + loop_var: tasks_file + include_tasks: "{{ tasks_file }}" diff --git a/roles/installer/openbsd/base/defaults/main.yml b/roles/installer/openbsd/base/defaults/main.yml index bb2c177a..c852e00a 100644 --- a/roles/installer/openbsd/base/defaults/main.yml +++ b/roles/installer/openbsd/base/defaults/main.yml @@ -1,8 +1,8 @@ openbsd_versions: - - version: 6.6 + - version: 6.7 arch: - amd64 - i386 openbsd_installer_force_download: no -openbsd_installer_url: "https://ftp2.eu.openbsd.org/pub/OpenBSD" +openbsd_installer_url: "https://cdn.openbsd.org/pub/OpenBSD" -- cgit v1.2.3