Add cross-compiler role to x86 slaves
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 19 Feb 2016 22:53:40 +0000 (17:53 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 19 Feb 2016 22:53:40 +0000 (17:53 -0500)
automation/ansible/roles/cross-compilers/tasks/main.yml [new file with mode: 0644]
automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml [new file with mode: 0644]
automation/ansible/roles/cross-compilers/tasks/setup-RedHat.yml [new file with mode: 0644]
automation/ansible/roles/cross-compilers/vars/Debian.yml [new file with mode: 0644]
automation/ansible/roles/cross-compilers/vars/RedHat.yml [new file with mode: 0644]
automation/ansible/slave-all.yml
automation/ansible/slave-x32.yml
automation/ansible/slave-x64.yml

diff --git a/automation/ansible/roles/cross-compilers/tasks/main.yml b/automation/ansible/roles/cross-compilers/tasks/main.yml
new file mode 100644 (file)
index 0000000..1126124
--- /dev/null
@@ -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 (file)
index 0000000..878efd1
--- /dev/null
@@ -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 (file)
index 0000000..70f37de
--- /dev/null
@@ -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 (file)
index 0000000..06193ad
--- /dev/null
@@ -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 (file)
index 0000000..35f8482
--- /dev/null
@@ -0,0 +1,4 @@
+---
+# TODO
+__common_packages:
+  - java-1.7.0-openjdk-headless
index 00ad1148251547830ae141bb15efefcd6e127a09..1f5a18d44069d8ecb3ef0ab48a15e7abb30d1073 100644 (file)
@@ -1,6 +1,7 @@
 - hosts: all
   roles:
     - common
+    - cross-compiler
     - babeltrace
     - liburcu
     - lttng-ust
index e620adfff83baa0cca3dc89e47946adf8602f881..133e59fe114fd6f0c20168bf8f62684354e4220f 100644 (file)
@@ -1,6 +1,7 @@
 - hosts: slave-x32
   roles:
     - common
+    - cross-compiler
     - babeltrace
     - liburcu
     - lttng-ust
index 4bfbbdf8930d4124c2a9f2ba793624a09419b678..7e672b3b54931160087b41bd4d1d2a47c3cb7ec3 100644 (file)
@@ -1,6 +1,7 @@
 - hosts: slave-x64
   roles:
     - common
+    - cross-compiler
     - babeltrace
     - liburcu
     - lttng-ust
This page took 0.025498 seconds and 4 git commands to generate.