diff options
Diffstat (limited to 'ansible/roles/install-poky-sdk')
-rw-r--r-- | ansible/roles/install-poky-sdk/README.md | 10 | ||||
-rw-r--r-- | ansible/roles/install-poky-sdk/defaults/main.yml | 7 | ||||
-rw-r--r-- | ansible/roles/install-poky-sdk/tasks/main.yml | 42 |
3 files changed, 59 insertions, 0 deletions
diff --git a/ansible/roles/install-poky-sdk/README.md b/ansible/roles/install-poky-sdk/README.md new file mode 100644 index 0000000..541ea3c --- /dev/null +++ b/ansible/roles/install-poky-sdk/README.md @@ -0,0 +1,10 @@ +# Install the poky sdk 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`. + diff --git a/ansible/roles/install-poky-sdk/defaults/main.yml b/ansible/roles/install-poky-sdk/defaults/main.yml new file mode 100644 index 0000000..976a03f --- /dev/null +++ b/ansible/roles/install-poky-sdk/defaults/main.yml @@ -0,0 +1,7 @@ +--- +# OS user +jenkins_user: jenkins + +poky_installer_file: poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.2.sh +poky_version: 2.3.2 + diff --git a/ansible/roles/install-poky-sdk/tasks/main.yml b/ansible/roles/install-poky-sdk/tasks/main.yml new file mode 100644 index 0000000..dda60c5 --- /dev/null +++ b/ansible/roles/install-poky-sdk/tasks/main.yml @@ -0,0 +1,42 @@ +--- + +- name: install bzip2 and tar + apt: + name: "{{ item }}" + cache_valid_time: 3600 + update_cache: yes + with_items: + - tar + - bzip2 + +- name: copy poky installer + copy: + src: "{{ poky_installer_file }}" + dest: "/tmp/{{ poky_installer_file }}" + mode: 750 + register: poky_copy + ignore_errors: yes + tags: [poky] + +- name: execute poky installer + command: "/tmp/{{ poky_installer_file }}" + args: + creates: "/opt/poky/{{ poky_version }}" + when: poky_copy.failed == false + tags: [poky] + +- name: change owner/group to jenkins user + file: + path: /opt/poky + owner: "{{ jenkins_user }}" + group: "{{ jenkins_user }}" + recurse: yes + 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 }}" + when: poky_copy.failed + tags: [poky] + |