summaryrefslogtreecommitdiffstats
path: root/playbooks/roles
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/roles')
-rw-r--r--playbooks/roles/pre-install/tasks/main.yml14
-rw-r--r--playbooks/roles/pre-install/vars/Debian.yml6
2 files changed, 19 insertions, 1 deletions
diff --git a/playbooks/roles/pre-install/tasks/main.yml b/playbooks/roles/pre-install/tasks/main.yml
index da21c16..ba3e1c0 100644
--- a/playbooks/roles/pre-install/tasks/main.yml
+++ b/playbooks/roles/pre-install/tasks/main.yml
@@ -8,8 +8,10 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-- name: Ensure Python3 is installed (Equinix Metal)
+- name: Ensure Python3 is installed for CentOS (Equinix Metal)
raw: yum install -y python3
+ ignore_errors: true
+ failed_when: false
when: lookup('env', 'VENDOR') == 'equinix-metal'
- name: Gather facts
@@ -19,6 +21,16 @@
include_vars:
file: "{{ ansible_os_family }}.yml"
+- name: Update cache (RedHat)
+ yum:
+ update_cache: yes
+ when: ansible_os_family == "RedHat"
+
+- name: Update cache (Debian)
+ apt:
+ update_cache: yes
+ when: ansible_os_family == "Debian"
+
- name: Install BRMA requirements
become: true
package:
diff --git a/playbooks/roles/pre-install/vars/Debian.yml b/playbooks/roles/pre-install/vars/Debian.yml
new file mode 100644
index 0000000..1a7144b
--- /dev/null
+++ b/playbooks/roles/pre-install/vars/Debian.yml
@@ -0,0 +1,6 @@
+---
+bmra_pkgs:
+ - lshw
+ - pciutils
+ - ethtool
+ - python3