aboutsummaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-04-26 15:25:04 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-04-26 15:38:12 +0200
commit0d33d9204ae6ddf7e48e72d3512fe49d2ad2c1ba (patch)
treea28f69711128b3586b6e49d773e6cabc12ad0040 /ansible
parentd745bee443c5249eaccfbba41f720a20ae2e70d6 (diff)
generalize the install-poky-sdk role to support multiple sdks
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/install-poky-sdk/README.md15
-rw-r--r--ansible/roles/install-poky-sdk/defaults/main.yml4
-rw-r--r--ansible/roles/install-poky-sdk/tasks/main.yml14
-rw-r--r--ansible/setup-desktop.yml2
-rw-r--r--ansible/setup-jenkins-slave.yml9
5 files changed, 32 insertions, 12 deletions
diff --git a/ansible/roles/install-poky-sdk/README.md b/ansible/roles/install-poky-sdk/README.md
index 541ea3c..7f2c31e 100644
--- a/ansible/roles/install-poky-sdk/README.md
+++ b/ansible/roles/install-poky-sdk/README.md
@@ -1,10 +1,17 @@
-# Install the poky sdk used to build sysmobts binaries
+# Install the poky sdk's used to build sysmobts binaries
# Poky Installation
The poky installation requires you to have the installer available.
Put the `poky_installer_file` to the root directory of this repo.
-Also the exact filename must match the variable `poky_installer_file` and the
-`poky_version`.
-For the defaults of those variable have a look into `defaults/main.yml`.
+Also the exact filename must match the variable `poky_installer_file`
+example:
+```
+ - name: install-poky-sdk
+ jenkins_user: osmocom-build
+ poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh
+ poky_dest: /opt/poky-sdk/2.3.4/
+ tags:
+ - poky
+```
diff --git a/ansible/roles/install-poky-sdk/defaults/main.yml b/ansible/roles/install-poky-sdk/defaults/main.yml
index 9b8eb04..5b7385c 100644
--- a/ansible/roles/install-poky-sdk/defaults/main.yml
+++ b/ansible/roles/install-poky-sdk/defaults/main.yml
@@ -1,7 +1,3 @@
---
# OS user
jenkins_user: jenkins
-
-poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh
-poky_version: 2.3.4
-
diff --git a/ansible/roles/install-poky-sdk/tasks/main.yml b/ansible/roles/install-poky-sdk/tasks/main.yml
index 9d64347..85b310a 100644
--- a/ansible/roles/install-poky-sdk/tasks/main.yml
+++ b/ansible/roles/install-poky-sdk/tasks/main.yml
@@ -1,5 +1,4 @@
---
-
- name: install bzip2 and tar
apt:
name: "{{ item }}"
@@ -19,21 +18,28 @@
tags: [poky]
- name: execute poky installer
- command: "/tmp/{{ poky_installer_file }} -y"
+ command: "/tmp/{{ poky_installer_file }} -y -d '{{ poky_dest }}'"
args:
- creates: "/opt/poky/{{ poky_version }}"
+ creates: "{{ poky_dest }}"
when: poky_copy.failed == false
tags: [poky]
- name: change owner/group to jenkins user
file:
- path: /opt/poky
+ path: "{{ poky_dest }}"
owner: "{{ jenkins_user }}"
group: "{{ jenkins_user }}"
recurse: yes
when: poky_copy.failed == false
tags: [poky]
+- name: remove poky installer
+ file:
+ path: "/tmp/{{ poky_installer_file }}"
+ state: absent
+ when: poky_copy.failed == false
+ tags: [poky]
+
- name: "Please download {{ poky_installer_file }} to your ansible directory to allow ansible to install poky"
debug:
msg: "Ansible can not find or copy {{ poky_installer_file }}"
diff --git a/ansible/setup-desktop.yml b/ansible/setup-desktop.yml
index 507a8f2..563d124 100644
--- a/ansible/setup-desktop.yml
+++ b/ansible/setup-desktop.yml
@@ -9,6 +9,8 @@
- name: install-poky-sdk
jenkins_user: osmocom-build
+ poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh
+ poky_dest: /opt/poky-sdk/2.3.4/
tags:
- poky
diff --git a/ansible/setup-jenkins-slave.yml b/ansible/setup-jenkins-slave.yml
index 4ca7188..1135ab2 100644
--- a/ansible/setup-jenkins-slave.yml
+++ b/ansible/setup-jenkins-slave.yml
@@ -21,6 +21,15 @@
- name: install-poky-sdk
jenkins_user: osmocom-build
+ poky_install_file: poky-glibc-x86_64-meta-toolchain-osmo-cortexa15hf-neon-toolchain-osmo-2.3.4-20190426050512.sh
+ poky_dest: /opt/poky-oc2g/2.3.4/
+ tags:
+ - poky
+
+ - name: install-poky-sdk
+ jenkins_user: osmocom-build
+ poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.4.sh
+ poky_dest: /opt/poky-sdk/2.3.4/
tags:
- poky