From: Michael Jeanson Date: Mon, 13 Mar 2017 18:19:11 +0000 (-0400) Subject: ansible: Add LTTng-scope X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=89ae81c0898b3e3c05996547505a97ce24fabed7;p=lttng-ci.git ansible: Add LTTng-scope Signed-off-by: Michael Jeanson --- diff --git a/automation/ansible/roles/lttng-scope/tasks/main.yml b/automation/ansible/roles/lttng-scope/tasks/main.yml new file mode 100644 index 0000000..b45a1b6 --- /dev/null +++ b/automation/ansible/roles/lttng-scope/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 lttng_scope_packages. + set_fact: + lttng_scope_packages: "{{ __lttng_scope_packages | list }}" + when: lttng_scope_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/lttng-scope/tasks/setup-Debian.yml b/automation/ansible/roles/lttng-scope/tasks/setup-Debian.yml new file mode 100644 index 0000000..15fe492 --- /dev/null +++ b/automation/ansible/roles/lttng-scope/tasks/setup-Debian.yml @@ -0,0 +1,11 @@ +--- +- name: Update apt cache. + apt: update_cache=yes cache_valid_time=86400 + +- name: Ensure unity is installed. + apt: "name=unity install_recommends=no" + +- name: Ensure lttng_scope build dependencies are installed. + apt: "name={{ item }} state=installed" + with_items: "{{ lttng_scope_packages }}" + diff --git a/automation/ansible/roles/lttng-scope/tasks/setup-RedHat.yml b/automation/ansible/roles/lttng-scope/tasks/setup-RedHat.yml new file mode 100644 index 0000000..ccd3b7a --- /dev/null +++ b/automation/ansible/roles/lttng-scope/tasks/setup-RedHat.yml @@ -0,0 +1,6 @@ +--- +- name: Ensure lttng_scope build dependencies are installed. + yum: + name: "{{ item }}" + state: installed + with_items: "{{ lttng_scope_packages }}" diff --git a/automation/ansible/roles/lttng-scope/vars/Debian.yml b/automation/ansible/roles/lttng-scope/vars/Debian.yml new file mode 100644 index 0000000..cc01bab --- /dev/null +++ b/automation/ansible/roles/lttng-scope/vars/Debian.yml @@ -0,0 +1,12 @@ +--- +__lttng_scope_packages: + - openjdk-8-jdk + - openjfx + - metacity + - xfonts-100dpi + - xfonts-75dpi + - xfonts-scalable + - xfonts-cyrillic + - xvfb + - x11-apps + - imagemagick diff --git a/automation/ansible/roles/lttng-scope/vars/RedHat.yml b/automation/ansible/roles/lttng-scope/vars/RedHat.yml new file mode 100644 index 0000000..9ef6947 --- /dev/null +++ b/automation/ansible/roles/lttng-scope/vars/RedHat.yml @@ -0,0 +1,3 @@ +--- +# TODO +__lttng_scope_packages: diff --git a/automation/ansible/slave-amd64.yml b/automation/ansible/slave-amd64.yml index 1ce4964..9cdf66f 100644 --- a/automation/ansible/slave-amd64.yml +++ b/automation/ansible/slave-amd64.yml @@ -8,4 +8,5 @@ - lttng-tools - lttng-modules - lttng-analyses + - lttng-scope - tracecompass diff --git a/automation/ansible/slave-i386.yml b/automation/ansible/slave-i386.yml index 460a0fb..7c64495 100644 --- a/automation/ansible/slave-i386.yml +++ b/automation/ansible/slave-i386.yml @@ -8,4 +8,5 @@ - lttng-tools - lttng-modules - lttng-analyses + - lttng-scope - tracecompass