generalize the install-poky-sdk role to support multiple sdks

Change-Id: I35f34a089311808cb21a064dd50e41cd1887b320
This commit is contained in:
Alexander Couzens 2019-04-26 15:25:04 +02:00 committed by Pau Espin Pedrol
parent d745bee443
commit 0d33d9204a
5 changed files with 32 additions and 12 deletions

View File

@ -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
```

View File

@ -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

View File

@ -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 }}"

View File

@ -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

View File

@ -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