aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/common/tasks
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/tasks
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/tasks')
-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
2 files changed, 15 insertions, 7 deletions
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