aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/common
diff options
context:
space:
mode:
authorStanislav Chlebec <stanislav.chlebec@pantheon.tech>2019-01-16 15:42:36 +0100
committerPeter Mikus <pmikus@cisco.com>2019-02-19 15:44:25 +0000
commitab596c32fdda48aa8140f428710b98d47baf9cae (patch)
tree103093102eb82f40a583643067dcadf114e5e369 /resources/tools/testbed-setup/ansible/roles/common
parentd1589ad74e515757fb12cf8a5f976282924afe13 (diff)
Ansible testbed setup for Taishan testbed
Change-Id: I4b42aa5bf7635ade95f81c0c92a6ff1bf43d3fa0 Signed-off-by: Stanislav Chlebec <stanislav.chlebec@pantheon.tech> Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/common')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/common/files/apt-sources-arm.list47
-rw-r--r--resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml8
-rw-r--r--resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml (renamed from resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_x86_64.yaml)14
3 files changed, 62 insertions, 7 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/common/files/apt-sources-arm.list b/resources/tools/testbed-setup/ansible/roles/common/files/apt-sources-arm.list
new file mode 100644
index 0000000000..08da1ecf96
--- /dev/null
+++ b/resources/tools/testbed-setup/ansible/roles/common/files/apt-sources-arm.list
@@ -0,0 +1,47 @@
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic main restricted
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic main restricted
+
+## Major bug fix updates produced after the final release of the
+## distribution.
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team. Also, please note that software in universe WILL NOT receive any
+## review or updates from the Ubuntu security team.
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic universe
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic universe
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-updates universe
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-updates universe
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team, and may not be under a free licence. Please satisfy yourself as to
+## your rights to use the software. Also, please note that software in
+## multiverse WILL NOT receive any review or updates from the Ubuntu
+## security team.
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic multiverse
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic multiverse
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-updates multiverse
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-updates multiverse
+
+## N.B. software from this repository may not have been tested as
+## extensively as that contained in the main release, although it includes
+## newer versions of some applications which may provide useful features.
+## Also, please note that software in backports WILL NOT receive any review
+## or updates from the Ubuntu security team.
+deb http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
+deb-src http://ca.ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
+
+deb http://ports.ubuntu.com/ubuntu-ports bionic-security main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports bionic-security main restricted
+deb http://ports.ubuntu.com/ubuntu-ports bionic-security universe
+deb-src http://ports.ubuntu.com/ubuntu-ports bionic-security universe
+deb http://ports.ubuntu.com/ubuntu-ports bionic-security multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports bionic-security multiverse
+
+## Uncomment the following two lines to add software from Canonical's
+## 'partner' repository.
+## This software is not part of Ubuntu, but is offered by Canonical and the
+## respective vendors as a service to Ubuntu users.
+# deb http://archive.canonical.com/ubuntu bionic partner
+# deb-src http://archive.canonical.com/ubuntu bionic partner
diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
index 06058a427b..38d8188be8 100644
--- a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
@@ -2,8 +2,8 @@
# file: roles/common/tasks/main.yaml
- name: Ubuntu specific
- import_tasks: ubuntu_x86_64.yaml
- when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64'
+ import_tasks: ubuntu.yaml
+ when: ansible_distribution|lower == 'ubuntu'
- name: Set hostname
hostname:
@@ -17,7 +17,7 @@
line: '{{ ansible_default_ipv4.address }} {{ hostname }}.linuxfoundation.org'
tags: set-hostname
-- name: Set sudoers
+- name: Set sudoers admin
lineinfile:
path: '/etc/sudoers'
state: 'present'
@@ -26,7 +26,7 @@
validate: '/usr/sbin/visudo -cf %s'
tags: set-sudoers
-- name: Set sudoers
+- name: Set sudoers sudo
lineinfile:
path: '/etc/sudoers'
state: 'present'
diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml
index b6116c3690..ff47ffc656 100644
--- a/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu_x86_64.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml
@@ -1,11 +1,19 @@
---
-# file: roles/common/tasks/ubuntu_x86_64.yaml
+# file: roles/common/tasks/ubuntu.yaml
-- name: Copy apt sources file
+- name: Copy aarch64 apt sources file
+ template:
+ src: 'files/apt-sources-arm.list'
+ dest: '/etc/apt/sources.list'
+ tags: copy-apt-sources
+ when: ansible_machine == 'aarch64'
+
+- name: Copy x86_64 apt sources file
template:
src: 'files/apt-sources.list'
dest: '/etc/apt/sources.list'
tags: copy-apt-sources
+ when: ansible_machine == 'x86_64'
- name: Install python-apt
apt:
@@ -44,7 +52,7 @@
- name: Install qemu
apt:
- name: 'qemu-system-x86'
+ name: 'qemu-system'
state: 'present'
update_cache: True
tags: install-qemu