From 1be0d0125f90d8bb43538bb28c704afb11953f85 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Sat, 4 Jun 2016 14:04:57 -0400 Subject: [PATCH] ansible: Add Alpine Linux support --- .../ansible/roles/babeltrace/tasks/main.yml | 3 +++ .../roles/babeltrace/tasks/setup-Alpine.yml | 7 +++++ .../ansible/roles/babeltrace/vars/Alpine.yml | 11 ++++++++ .../ansible/roles/common/tasks/main.yml | 3 +++ .../roles/common/tasks/setup-Alpine.yml | 7 +++++ .../ansible/roles/common/vars/Alpine.yml | 26 +++++++++++++++++++ .../roles/cross-compilers/tasks/main.yml | 3 +++ .../cross-compilers/tasks/setup-Alpine.yml | 7 +++++ .../roles/cross-compilers/vars/Alpine.yml | 3 +++ .../ansible/roles/liburcu/tasks/main.yml | 3 +++ .../roles/liburcu/tasks/setup-Alpine.yml | 7 +++++ .../ansible/roles/liburcu/vars/Alpine.yml | 2 ++ .../roles/lttng-modules/tasks/main.yml | 3 +++ .../lttng-modules/tasks/setup-Alpine.yml | 8 ++++++ .../roles/lttng-modules/vars/Alpine.yml | 6 +++++ .../ansible/roles/lttng-tools/tasks/main.yml | 7 ++++- .../roles/lttng-tools/tasks/setup-Alpine.yml | 7 +++++ .../ansible/roles/lttng-tools/vars/Alpine.yml | 7 +++++ .../ansible/roles/lttng-ust/tasks/main.yml | 3 +++ .../roles/lttng-ust/tasks/setup-Alpine.yml | 7 +++++ .../ansible/roles/lttng-ust/vars/Alpine.yml | 7 +++++ 21 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 automation/ansible/roles/babeltrace/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/babeltrace/vars/Alpine.yml create mode 100644 automation/ansible/roles/common/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/common/vars/Alpine.yml create mode 100644 automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/cross-compilers/vars/Alpine.yml create mode 100644 automation/ansible/roles/liburcu/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/liburcu/vars/Alpine.yml create mode 100644 automation/ansible/roles/lttng-modules/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/lttng-modules/vars/Alpine.yml create mode 100644 automation/ansible/roles/lttng-tools/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/lttng-tools/vars/Alpine.yml create mode 100644 automation/ansible/roles/lttng-ust/tasks/setup-Alpine.yml create mode 100644 automation/ansible/roles/lttng-ust/vars/Alpine.yml diff --git a/automation/ansible/roles/babeltrace/tasks/main.yml b/automation/ansible/roles/babeltrace/tasks/main.yml index cd629fa..430f324 100644 --- a/automation/ansible/roles/babeltrace/tasks/main.yml +++ b/automation/ansible/roles/babeltrace/tasks/main.yml @@ -14,3 +14,6 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' + +- include: setup-Alpine.yml + when: ansible_os_family == 'Alpine' diff --git a/automation/ansible/roles/babeltrace/tasks/setup-Alpine.yml b/automation/ansible/roles/babeltrace/tasks/setup-Alpine.yml new file mode 100644 index 0000000..29d7980 --- /dev/null +++ b/automation/ansible/roles/babeltrace/tasks/setup-Alpine.yml @@ -0,0 +1,7 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure babeltrace build dependencies are installed. + apk: "name={{ item }} state=present" + with_items: babeltrace_packages diff --git a/automation/ansible/roles/babeltrace/vars/Alpine.yml b/automation/ansible/roles/babeltrace/vars/Alpine.yml new file mode 100644 index 0000000..d0ccd65 --- /dev/null +++ b/automation/ansible/roles/babeltrace/vars/Alpine.yml @@ -0,0 +1,11 @@ +--- +__babeltrace_packages: + - popt-dev + - util-linux-dev + - python3-dev +# - python3-sphinx + - swig + - glib-dev + - libdwarf-dev + - libelf-dev + - chrpath diff --git a/automation/ansible/roles/common/tasks/main.yml b/automation/ansible/roles/common/tasks/main.yml index 82a7849..f756faa 100644 --- a/automation/ansible/roles/common/tasks/main.yml +++ b/automation/ansible/roles/common/tasks/main.yml @@ -15,6 +15,9 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' +- include: setup-Alpine.yml + when: ansible_os_family == 'Alpine' + - name: Create jenkins user user: name: 'jenkins' diff --git a/automation/ansible/roles/common/tasks/setup-Alpine.yml b/automation/ansible/roles/common/tasks/setup-Alpine.yml new file mode 100644 index 0000000..6a03f75 --- /dev/null +++ b/automation/ansible/roles/common/tasks/setup-Alpine.yml @@ -0,0 +1,7 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure common packages are installed. + apk: "name={{ item }} state=present" + with_items: common_packages diff --git a/automation/ansible/roles/common/vars/Alpine.yml b/automation/ansible/roles/common/vars/Alpine.yml new file mode 100644 index 0000000..7e335ff --- /dev/null +++ b/automation/ansible/roles/common/vars/Alpine.yml @@ -0,0 +1,26 @@ +--- +__common_packages: + - sudo + - openjdk8 + - git + - vim + - tree + - htop + - alpine-sdk + - clang + - automake + - autoconf + - libtool + - bison + - flex + - perl + - jq + - cppcheck + - cloc + - py-virtualenv + - curl + - gettext + - openssl-dev + - coreutils + - bash + - shadow diff --git a/automation/ansible/roles/cross-compilers/tasks/main.yml b/automation/ansible/roles/cross-compilers/tasks/main.yml index 7a95431..071456a 100644 --- a/automation/ansible/roles/cross-compilers/tasks/main.yml +++ b/automation/ansible/roles/cross-compilers/tasks/main.yml @@ -14,3 +14,6 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' + +- include: setup-Alpine.yml + when: ansible_os_family == 'Alpine' diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml new file mode 100644 index 0000000..99bcae3 --- /dev/null +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Alpine.yml @@ -0,0 +1,7 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure cross-compilers packages are installed. + apk: "name={{ item }} state=present" + with_items: cross_compilers_packages diff --git a/automation/ansible/roles/cross-compilers/vars/Alpine.yml b/automation/ansible/roles/cross-compilers/vars/Alpine.yml new file mode 100644 index 0000000..3528230 --- /dev/null +++ b/automation/ansible/roles/cross-compilers/vars/Alpine.yml @@ -0,0 +1,3 @@ +--- +# TODO +__cross_compilers_packages: [] diff --git a/automation/ansible/roles/liburcu/tasks/main.yml b/automation/ansible/roles/liburcu/tasks/main.yml index 867decb..f33db15 100644 --- a/automation/ansible/roles/liburcu/tasks/main.yml +++ b/automation/ansible/roles/liburcu/tasks/main.yml @@ -14,3 +14,6 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' + +- include: setup-Alpine.yml + when: ansible_os_family == 'Alpine' diff --git a/automation/ansible/roles/liburcu/tasks/setup-Alpine.yml b/automation/ansible/roles/liburcu/tasks/setup-Alpine.yml new file mode 100644 index 0000000..43f1d44 --- /dev/null +++ b/automation/ansible/roles/liburcu/tasks/setup-Alpine.yml @@ -0,0 +1,7 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure liburcu build dependencies are installed. + apk: "name={{ item }} state=present" + with_items: liburcu_packages diff --git a/automation/ansible/roles/liburcu/vars/Alpine.yml b/automation/ansible/roles/liburcu/vars/Alpine.yml new file mode 100644 index 0000000..c597f60 --- /dev/null +++ b/automation/ansible/roles/liburcu/vars/Alpine.yml @@ -0,0 +1,2 @@ +--- +__liburcu_packages: [] diff --git a/automation/ansible/roles/lttng-modules/tasks/main.yml b/automation/ansible/roles/lttng-modules/tasks/main.yml index 571bdb3..e7eb36f 100644 --- a/automation/ansible/roles/lttng-modules/tasks/main.yml +++ b/automation/ansible/roles/lttng-modules/tasks/main.yml @@ -15,6 +15,9 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' +- include: setup-Alpine.yml + when: ansible_os_family == 'Alpine' + - name: checkout repo git: repo=git://artifacts.internal.efficios.com/git/linux-stable.git dest=/home/jenkins/gitcache/linux-stable.git diff --git a/automation/ansible/roles/lttng-modules/tasks/setup-Alpine.yml b/automation/ansible/roles/lttng-modules/tasks/setup-Alpine.yml new file mode 100644 index 0000000..c79686e --- /dev/null +++ b/automation/ansible/roles/lttng-modules/tasks/setup-Alpine.yml @@ -0,0 +1,8 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure lttng-modules build dependencies are installed. + apk: "name={{ item }} state=present" + with_items: lttng_modules_packages + diff --git a/automation/ansible/roles/lttng-modules/vars/Alpine.yml b/automation/ansible/roles/lttng-modules/vars/Alpine.yml new file mode 100644 index 0000000..571d300 --- /dev/null +++ b/automation/ansible/roles/lttng-modules/vars/Alpine.yml @@ -0,0 +1,6 @@ +--- +__lttng_modules_packages: +# - kernel-wedge + - libelf-dev + - bc +# - gcc-4.9 diff --git a/automation/ansible/roles/lttng-tools/tasks/main.yml b/automation/ansible/roles/lttng-tools/tasks/main.yml index e7261a1..e71273f 100644 --- a/automation/ansible/roles/lttng-tools/tasks/main.yml +++ b/automation/ansible/roles/lttng-tools/tasks/main.yml @@ -11,7 +11,9 @@ - name: Define lttng_tools_packages_no_recommends. set_fact: lttng_tools_packages_no_recommends: "{{ __lttng_tools_packages_no_recommends | list }}" - when: lttng_tools_packages_no_recommends is not defined + when: + - lttng_tools_packages_no_recommends is not defined + - ansible_os_family == 'Debian' # Setup/install tasks. - include: setup-RedHat.yml @@ -19,3 +21,6 @@ - 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-tools/tasks/setup-Alpine.yml b/automation/ansible/roles/lttng-tools/tasks/setup-Alpine.yml new file mode 100644 index 0000000..59bc099 --- /dev/null +++ b/automation/ansible/roles/lttng-tools/tasks/setup-Alpine.yml @@ -0,0 +1,7 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure lttng-tools build dependencies are installed. + apk: "name={{ item }} state=present" + with_items: lttng_tools_packages diff --git a/automation/ansible/roles/lttng-tools/vars/Alpine.yml b/automation/ansible/roles/lttng-tools/vars/Alpine.yml new file mode 100644 index 0000000..410e912 --- /dev/null +++ b/automation/ansible/roles/lttng-tools/vars/Alpine.yml @@ -0,0 +1,7 @@ +--- +__lttng_tools_packages: + - popt-dev + - libxml2-dev + - bash-completion + - asciidoc + - xmlto diff --git a/automation/ansible/roles/lttng-ust/tasks/main.yml b/automation/ansible/roles/lttng-ust/tasks/main.yml index 9585275..6eab757 100644 --- a/automation/ansible/roles/lttng-ust/tasks/main.yml +++ b/automation/ansible/roles/lttng-ust/tasks/main.yml @@ -14,3 +14,6 @@ - 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-ust/tasks/setup-Alpine.yml b/automation/ansible/roles/lttng-ust/tasks/setup-Alpine.yml new file mode 100644 index 0000000..faa75df --- /dev/null +++ b/automation/ansible/roles/lttng-ust/tasks/setup-Alpine.yml @@ -0,0 +1,7 @@ +--- +- name: Update apk cache. + apk: update_cache=yes + +- name: Ensure lttng-ust build dependencies are installed. + apk: "name={{ item }} state=present" + with_items: lttng_ust_packages diff --git a/automation/ansible/roles/lttng-ust/vars/Alpine.yml b/automation/ansible/roles/lttng-ust/vars/Alpine.yml new file mode 100644 index 0000000..b564c17 --- /dev/null +++ b/automation/ansible/roles/lttng-ust/vars/Alpine.yml @@ -0,0 +1,7 @@ +--- +__lttng_ust_packages: + - util-linux-dev + - texinfo + - python3 +# - liblog4j1.2-java + - openjdk8 -- 2.34.1