diff options
author | Michael S. Pedersen <michaelx.pedersen@intel.com> | 2020-11-26 11:19:08 +0000 |
---|---|---|
committer | Rihab Banday <rihab.banday@ericsson.com> | 2020-12-03 19:29:32 +0000 |
commit | 7155286ed00a8bce09a948fb54fb4eeb85027e49 (patch) | |
tree | 74c728ac707a2b016ed5dd47aa688909287249c3 /playbooks/roles/pre-install | |
parent | d3916f20f0b10da360cc6c38b61e1ee04d6278c5 (diff) |
Update BMRA to v2.0
Also adds configuration of BMRA through the existing hw_config files (idf, pdf)
and better handling of dependencies.
Signed-off-by: Michael S. Pedersen <michaelx.pedersen@intel.com>
Change-Id: Iedaf249f01ea3e1e00c889e846e21644adff98c7
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71504
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Reviewed-by: Rihab Banday <rihab.banday@ericsson.com>
Reviewed-by: Georg Kunz <georg.kunz@ericsson.com>
Diffstat (limited to 'playbooks/roles/pre-install')
-rw-r--r-- | playbooks/roles/pre-install/tasks/main.yml | 26 | ||||
-rw-r--r-- | playbooks/roles/pre-install/vars/RedHat.yml | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/playbooks/roles/pre-install/tasks/main.yml b/playbooks/roles/pre-install/tasks/main.yml index db6534d..9b725c7 100644 --- a/playbooks/roles/pre-install/tasks/main.yml +++ b/playbooks/roles/pre-install/tasks/main.yml @@ -8,6 +8,13 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +- name: Ensure Python3 is installed (Equinix Metal) + raw: yum install -y python3 + when: lookup('env', 'VENDOR') == 'equinix-metal' + +- name: Gather facts + setup: + - name: Load distro variables include_vars: file: "{{ ansible_os_family }}.yml" @@ -18,3 +25,22 @@ name: "{{ item }}" state: present with_items: "{{ bmra_pkgs }}" + +- name: Check if Python is present in PATH + shell: "which python" + register: pypath + failed_when: false + +- name: Check if /usr/bin/python exists + stat: + path: /usr/bin/python + register: pybin + +- name: Create symlink for Python + file: + src: /usr/bin/python3 + dest: /usr/bin/python + state: link + when: + - not pybin.stat.exists + - pypath.rc != 0 diff --git a/playbooks/roles/pre-install/vars/RedHat.yml b/playbooks/roles/pre-install/vars/RedHat.yml index 5adac50..cf20b89 100644 --- a/playbooks/roles/pre-install/vars/RedHat.yml +++ b/playbooks/roles/pre-install/vars/RedHat.yml @@ -12,3 +12,5 @@ bmra_pkgs: - lshw - pciutils - ethtool + - python3 + - 'dnf-command(config-manager)' |