From: Michael Jeanson Date: Fri, 19 Feb 2016 22:53:40 +0000 (-0500) Subject: Add cross-compiler role to x86 slaves X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=601db8ee4148afe73f8969dd8b8dc1e44dc7695c;p=lttng-ci.git Add cross-compiler role to x86 slaves --- diff --git a/automation/ansible/roles/cross-compilers/tasks/main.yml b/automation/ansible/roles/cross-compilers/tasks/main.yml new file mode 100644 index 0000000..1126124 --- /dev/null +++ b/automation/ansible/roles/cross-compilers/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# Include variables and define needed variables. +- name: Include OS-specific variables. + include_vars: "{{ ansible_os_family }}.yml" + +- name: Define common_packages. + set_fact: + common_packages: "{{ __common_packages | list }}" + when: common_packages is not defined + +# Setup/install tasks. +- include: setup-RedHat.yml + when: ansible_os_family == 'RedHat' + +- include: setup-Debian.yml + when: ansible_os_family == 'Debian' diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml new file mode 100644 index 0000000..878efd1 --- /dev/null +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml @@ -0,0 +1,7 @@ +--- +- name: Update apt cache. + apt: update_cache=yes cache_valid_time=86400 + +- name: Ensure common packages are installed. + apt: "name={{ item }} state=installed" + with_items: common_packages diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml b/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml new file mode 100644 index 0000000..70f37de --- /dev/null +++ b/automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml @@ -0,0 +1,6 @@ +--- +- name: Ensure common packages are installed. + yum: + name: "{{ item }}" + state: installed + with_items: common_packages diff --git a/automation/ansible/roles/cross-compilers/vars/Debian.yml b/automation/ansible/roles/cross-compilers/vars/Debian.yml new file mode 100644 index 0000000..06193ad --- /dev/null +++ b/automation/ansible/roles/cross-compilers/vars/Debian.yml @@ -0,0 +1,6 @@ +--- +__common_packages: + - gcc-aarch64-linux-gnu + - gcc-powerpc64le-linux-gnu + - gcc-arm-linux-gnueabihf + - gcc-powerpc-linux-gnu diff --git a/automation/ansible/roles/cross-compilers/vars/RedHat.yml b/automation/ansible/roles/cross-compilers/vars/RedHat.yml new file mode 100644 index 0000000..35f8482 --- /dev/null +++ b/automation/ansible/roles/cross-compilers/vars/RedHat.yml @@ -0,0 +1,4 @@ +--- +# TODO +__common_packages: + - java-1.7.0-openjdk-headless diff --git a/automation/ansible/slave-all.yml b/automation/ansible/slave-all.yml index 00ad114..1f5a18d 100644 --- a/automation/ansible/slave-all.yml +++ b/automation/ansible/slave-all.yml @@ -1,6 +1,7 @@ - hosts: all roles: - common + - cross-compiler - babeltrace - liburcu - lttng-ust diff --git a/automation/ansible/slave-x32.yml b/automation/ansible/slave-x32.yml index e620adf..133e59f 100644 --- a/automation/ansible/slave-x32.yml +++ b/automation/ansible/slave-x32.yml @@ -1,6 +1,7 @@ - hosts: slave-x32 roles: - common + - cross-compiler - babeltrace - liburcu - lttng-ust diff --git a/automation/ansible/slave-x64.yml b/automation/ansible/slave-x64.yml index 4bfbbdf..7e672b3 100644 --- a/automation/ansible/slave-x64.yml +++ b/automation/ansible/slave-x64.yml @@ -1,6 +1,7 @@ - hosts: slave-x64 roles: - common + - cross-compiler - babeltrace - liburcu - lttng-ust