From 7e507932a091c0ab7049efc907ee2d0857aadb21 Mon Sep 17 00:00:00 2001 From: Stepan Andrushko Date: Thu, 23 Aug 2018 16:13:47 +0300 Subject: Adopt infra_deploy to spawn VM on LTS Ubuntu 18 Add possibility ro reuse infra_deploy.yaml to spawn VMs on jump host, depending on jump host Ubuntu version: either 16 or 18. JIRA: YARDSTICK-1396 Change-Id: Id0682c03098e611fe3a51cbd24d8ff2dda7c552a Signed-off-by: Stepan Andrushko --- .../infra_install_dependencies/tasks/Debian.yml | 34 ++++++++++++++++++++++ .../infra_install_dependencies/tasks/main.yml | 15 ++++++++++ 2 files changed, 49 insertions(+) create mode 100644 ansible/roles/infra_install_dependencies/tasks/Debian.yml create mode 100644 ansible/roles/infra_install_dependencies/tasks/main.yml (limited to 'ansible/roles/infra_install_dependencies') diff --git a/ansible/roles/infra_install_dependencies/tasks/Debian.yml b/ansible/roles/infra_install_dependencies/tasks/Debian.yml new file mode 100644 index 000000000..9f4dc1046 --- /dev/null +++ b/ansible/roles/infra_install_dependencies/tasks/Debian.yml @@ -0,0 +1,34 @@ +# Copyright (c) 2018 Intel Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +- name: Update repositories + apt: + update_cache: yes + +- name: Install core packages + action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" + with_items: + - python-libvirt + - genisoimage + when: ansible_distribution_major_version|int == 16 + +- name: Install core packages + action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" + with_items: + - python-pip + - python-libvirt + - python-lxml + - python-netaddr + - genisoimage + when: ansible_distribution_major_version|int >= 18 diff --git a/ansible/roles/infra_install_dependencies/tasks/main.yml b/ansible/roles/infra_install_dependencies/tasks/main.yml new file mode 100644 index 000000000..115b1e3b9 --- /dev/null +++ b/ansible/roles/infra_install_dependencies/tasks/main.yml @@ -0,0 +1,15 @@ +# Copyright (c) 2018 Intel Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +- include_tasks: "{{ ansible_os_family }}.yml" -- cgit 1.2.3-korg