From: Michael Jeanson Date: Tue, 26 Jul 2016 20:26:59 +0000 (-0400) Subject: ansible: Add lttng-analyses role X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b1b6ed9a3f60595c1679287506ff30883f9547cc;p=lttng-ci.git ansible: Add lttng-analyses role Signed-off-by: Michael Jeanson --- diff --git a/automation/ansible/lava-all.yml b/automation/ansible/lava-all.yml index eef6248..a523d1f 100644 --- a/automation/ansible/lava-all.yml +++ b/automation/ansible/lava-all.yml @@ -6,3 +6,4 @@ - lttng-ust - lttng-tools - lttng-modules + - lttng-analyses diff --git a/automation/ansible/roles/lttng-analyses/tasks/main.yml b/automation/ansible/roles/lttng-analyses/tasks/main.yml new file mode 100644 index 0000000..7cb5867 --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/tasks/main.yml @@ -0,0 +1,19 @@ +--- +# Include variables and define needed variables. +- name: Include OS-specific variables. + include_vars: "{{ ansible_os_family }}.yml" + +- name: Define lttng_analyses_packages. + set_fact: + lttng_analyses_packages: "{{ __lttng_analyses_packages | list }}" + when: lttng_analyses_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' + +- include: setup-Alpine.yml + when: ansible_os_family == 'Alpine' diff --git a/automation/ansible/roles/lttng-analyses/tasks/setup-Alpine.yml b/automation/ansible/roles/lttng-analyses/tasks/setup-Alpine.yml new file mode 100644 index 0000000..9bb8f4a --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/tasks/setup-Alpine.yml @@ -0,0 +1,8 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure lttng-analyses build dependencies are installed. + apk: "name={{ item }} state=present" + with_items: lttng_analyses_packages + diff --git a/automation/ansible/roles/lttng-analyses/tasks/setup-Debian.yml b/automation/ansible/roles/lttng-analyses/tasks/setup-Debian.yml new file mode 100644 index 0000000..2c873fe --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/tasks/setup-Debian.yml @@ -0,0 +1,8 @@ +--- +- name: Update apt cache. + apt: update_cache=yes cache_valid_time=86400 + +- name: Ensure lttng-analyses build dependencies are installed. + apt: "name={{ item }} state=installed" + with_items: lttng_analyses_packages + diff --git a/automation/ansible/roles/lttng-analyses/tasks/setup-RedHat.yml b/automation/ansible/roles/lttng-analyses/tasks/setup-RedHat.yml new file mode 100644 index 0000000..b350ad4 --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/tasks/setup-RedHat.yml @@ -0,0 +1,6 @@ +--- +- name: Ensure lttng-analyses build dependencies are installed. + yum: + name: "{{ item }}" + state: installed + with_items: lttng_analyses_packages diff --git a/automation/ansible/roles/lttng-analyses/vars/Alpine.yml b/automation/ansible/roles/lttng-analyses/vars/Alpine.yml new file mode 100644 index 0000000..a882762 --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/vars/Alpine.yml @@ -0,0 +1,2 @@ +--- +__lttng_analyses_packages: [] diff --git a/automation/ansible/roles/lttng-analyses/vars/Debian.yml b/automation/ansible/roles/lttng-analyses/vars/Debian.yml new file mode 100644 index 0000000..abb147f --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/vars/Debian.yml @@ -0,0 +1,5 @@ +--- +__lttng_analyses_packages: + - virtualenv + - python3-pyparsing + - python3-progressbar diff --git a/automation/ansible/roles/lttng-analyses/vars/RedHat.yml b/automation/ansible/roles/lttng-analyses/vars/RedHat.yml new file mode 100644 index 0000000..2b88bab --- /dev/null +++ b/automation/ansible/roles/lttng-analyses/vars/RedHat.yml @@ -0,0 +1,2 @@ +--- +__lttng_modules_packages: [] diff --git a/automation/ansible/slave-all.yml b/automation/ansible/slave-all.yml index a66b393..c246351 100644 --- a/automation/ansible/slave-all.yml +++ b/automation/ansible/slave-all.yml @@ -7,4 +7,5 @@ - lttng-ust - lttng-tools - lttng-modules + - lttng-analyses - tracecompass diff --git a/automation/ansible/slave-amd64.yml b/automation/ansible/slave-amd64.yml index 3835701..1ce4964 100644 --- a/automation/ansible/slave-amd64.yml +++ b/automation/ansible/slave-amd64.yml @@ -7,4 +7,5 @@ - lttng-ust - lttng-tools - lttng-modules + - lttng-analyses - tracecompass diff --git a/automation/ansible/slave-i386.yml b/automation/ansible/slave-i386.yml index 3fdebc8..460a0fb 100644 --- a/automation/ansible/slave-i386.yml +++ b/automation/ansible/slave-i386.yml @@ -7,4 +7,5 @@ - lttng-ust - lttng-tools - lttng-modules + - lttng-analyses - tracecompass diff --git a/automation/ansible/slave-standalone.yml b/automation/ansible/slave-standalone.yml index e02b42a..8953c31 100644 --- a/automation/ansible/slave-standalone.yml +++ b/automation/ansible/slave-standalone.yml @@ -7,4 +7,5 @@ - lttng-ust - lttng-tools - lttng-modules + - lttng-analyses - tracecompass