--- /dev/null
+# config file for ansible -- http://ansible.com/
+# ==============================================
+
+# nearly all parameters can be overridden in ansible-playbook
+# or with command line flags. ansible will read ANSIBLE_CONFIG,
+# ansible.cfg in the current working directory, .ansible.cfg in
+# the home directory or /etc/ansible/ansible.cfg, whichever it
+# finds first
+
+[defaults]
+
+# some basic default values...
+
+hostfile = /etc/ansible/hosts
+library = /usr/share/ansible
+remote_tmp = $HOME/.ansible/tmp
+pattern = *
+forks = 5
+poll_interval = 15
+sudo_user = root
+#ask_sudo_pass = True
+#ask_pass = True
+transport = smart
+remote_port = 22
+
+# additional paths to search for roles in, colon seperated
+#roles_path = /etc/ansible/roles
+
+# uncomment this to disable SSH key host checking
+#host_key_checking = False
+
+# change this for alternative sudo implementations
+sudo_exe = sudo
+
+# what flags to pass to sudo
+#sudo_flags = -H
+
+# SSH timeout
+timeout = 10
+
+# default user to use for playbooks if user is not specified
+# (/usr/bin/ansible will use current user as default)
+remote_user = root
+
+# logging is off by default unless this path is defined
+# if so defined, consider logrotate
+#log_path = /var/log/ansible.log
+
+# default module name for /usr/bin/ansible
+#module_name = command
+
+# use this shell for commands executed under sudo
+# you may need to change this to bin/bash in rare instances
+# if sudo is constrained
+#executable = /bin/sh
+
+# if inventory variables overlap, does the higher precedence one win
+# or are hash values merged together? The default is 'replace' but
+# this can also be set to 'merge'.
+#hash_behaviour = replace
+
+# How to handle variable replacement - as of 1.2, Jinja2 variable syntax is
+# preferred, but we still support the old $variable replacement too.
+# Turn off ${old_style} variables here if you like.
+#legacy_playbook_variables = yes
+
+# list any Jinja2 extensions to enable here:
+#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
+
+# if set, always use this private key file for authentication, same as
+# if passing --private-key to ansible or ansible-playbook
+#private_key_file = /path/to/file
+
+# format of string {{ ansible_managed }} available within Jinja2
+# templates indicates to users editing templates files will be replaced.
+# replacing {file}, {host} and {uid} and strftime codes with proper values.
+ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
+
+# by default, ansible-playbook will display "Skipping [host]" if it determines a task
+# should not be run on a host. Set this to "False" if you don't want to see these "Skipping"
+# messages. NOTE: the task header will still be shown regardless of whether or not the
+# task is skipped.
+#display_skipped_hosts = True
+
+# by default (as of 1.3), Ansible will raise errors when attempting to dereference
+# Jinja2 variables that are not set in templates or action lines. Uncomment this line
+# to revert the behavior to pre-1.3.
+#error_on_undefined_vars = False
+
+# set plugin path directories here, seperate with colons
+action_plugins = /usr/share/ansible_plugins/action_plugins
+callback_plugins = /usr/share/ansible_plugins/callback_plugins
+connection_plugins = /usr/share/ansible_plugins/connection_plugins
+lookup_plugins = /usr/share/ansible_plugins/lookup_plugins
+vars_plugins = /usr/share/ansible_plugins/vars_plugins
+filter_plugins = /usr/share/ansible_plugins/filter_plugins
+
+# don't like cows? that's unfortunate.
+# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
+#nocows = 1
+
+# don't like colors either?
+# set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1
+#nocolor = 1
+
+# the CA certificate path used for validating SSL certs. This path
+# should exist on the controlling node, not the target nodes
+# common locations:
+# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt
+# Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
+# Ubuntu : /usr/share/ca-certificates/cacert.org/cacert.org.crt
+#ca_file_path =
+
+# the http user-agent string to use when fetching urls. Some web server
+# operators block the default urllib user agent as it is frequently used
+# by malicious attacks/scripts, so we set it to something unique to
+# avoid issues.
+#http_user_agent = ansible-agent
+
+[paramiko_connection]
+
+# uncomment this line to cause the paramiko connection plugin to not record new host
+# keys encountered. Increases performance on new host additions. Setting works independently of the
+# host key checking setting above.
+#record_host_keys=False
+
+# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this
+# line to disable this behaviour.
+#pty=False
+
+[ssh_connection]
+
+# ssh arguments to use
+# Leaving off ControlPersist will result in poor performance, so use
+# paramiko on older platforms rather than removing it
+#ssh_args = -o ControlMaster=auto -o ControlPersist=60s
+
+# The path to use for the ControlPath sockets. This defaults to
+# "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with
+# very long hostnames or very long path names (caused by long user names or
+# deeply nested home directories) this can exceed the character limit on
+# file socket names (108 characters for most platforms). In that case, you
+# may wish to shorten the string below.
+#
+# Example:
+# control_path = %(directory)s/%%h-%%r
+#control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
+
+# Enabling pipelining reduces the number of SSH operations required to
+# execute a module on the remote server. This can result in a significant
+# performance improvement when enabled, however when using "sudo:" you must
+# first disable 'requiretty' in /etc/sudoers
+#
+# By default, this option is disabled to preserve compatibility with
+# sudoers configurations that have requiretty (the default on many distros).
+#
+#pipelining = False
+
+# if True, make ansible use scp if the connection type is ssh
+# (default is sftp)
+#scp_if_ssh = True
+
+[accelerate]
+accelerate_port = 5099
+accelerate_timeout = 30
+accelerate_connect_timeout = 5.0
--- /dev/null
+[hosts]
+cloud01.internal.efficios.com
+cloud02.internal.efficios.com
+cloud03.internal.efficios.com
+cloud04.internal.efficios.com
+cloud05.internal.efficios.com
+cloud06.internal.efficios.com
+#cloud07.internal.efficios.com
+#cloud08.internal.efficios.com
+
+[slave-armhf]
+ci-slave-armhf-01
+ci-slave-armhf-02
+
+[slave-powerpc]
+ci-slave-powerpc-01
+
+[slave-x32]
+ci-slave-x32-02-01
+ci-slave-x32-02-02
+ci-slave-x32-02-03
+ci-slave-x32-02-04
+ci-slave-x32-03-01
+ci-slave-x32-03-02
+ci-slave-x32-03-03
+ci-slave-x32-03-04
+ci-slave-x32-04-01
+ci-slave-x32-04-02
+ci-slave-x32-04-03
+ci-slave-x32-04-04
+ci-slave-x32-05-01
+ci-slave-x32-05-02
+ci-slave-x32-05-03
+ci-slave-x32-05-04
+ci-slave-x32-06-01
+ci-slave-x32-06-02
+ci-slave-x32-06-03
+ci-slave-x32-06-04
+
+[slave-x64]
+ci-slave-x64-02-01
+ci-slave-x64-02-02
+ci-slave-x64-02-03
+ci-slave-x64-02-04
+ci-slave-x64-03-01
+ci-slave-x64-03-02
+ci-slave-x64-03-03
+ci-slave-x64-03-04
+ci-slave-x64-04-01
+ci-slave-x64-04-02
+ci-slave-x64-04-03
+ci-slave-x64-04-04
+ci-slave-x64-05-01
+ci-slave-x64-05-02
+ci-slave-x64-05-03
+ci-slave-x64-05-04
+ci-slave-x64-06-01
+ci-slave-x64-06-02
+ci-slave-x64-06-03
+ci-slave-x64-06-04
+
+[slave:children]
+slave-x32
+slave-x64
+slave-armhf
+slave-powerpc
--- /dev/null
+- hosts: hosts
+ roles:
--- /dev/null
+---
+- name: Dist upgrade and optionnal reboot
+ hosts: all
+ vars:
+ restart: 'no'
+ reboot_wait: 300
+
+ vars_prompt:
+ - name: reboot
+ prompt: "Enter 'yes' to reboot"
+ default: 'no'
+ private: no
+
+ tasks:
+ - name: apt-get update
+ apt: update_cache=yes cache_valid_time=3600
+
+ - name: apt-get dist-upgrade
+ apt: upgrade=dist
+
+ - name: apt-get autoremove
+ command: apt-get -y --purge autoremove
+ register: autoremove_output
+ changed_when: "'The following packages will be REMOVED' in autoremove_output.stdout"
+
+ - name: reboot server
+ command: /sbin/reboot
+ async: 0
+ poll: 0
+ ignore_errors: true
+ when: reboot == "yes"
+ register: last_result
+
+ - name: wait for the server to reboot
+ local_action: wait_for host={{ inventory_hostname }}
+ port=22
+ delay=1
+ timeout=300
+ state=started
+ when: last_result.changed
+ sudo: false
--- /dev/null
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+ include_vars: "{{ ansible_os_family }}.yml"
+
+- name: Define babeltrace_packages.
+ set_fact:
+ babeltrace_packages: "{{ __babeltrace_packages | list }}"
+ when: babeltrace_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'
--- /dev/null
+---
+- name: Update apt cache.
+ apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure babeltrace build dependencies are installed.
+ apt: "name={{ item }} state=installed"
+ with_items: babeltrace_packages
--- /dev/null
+---
+- name: Ensure babeltrace build dependencies are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: babeltrace_packages
--- /dev/null
+---
+__babeltrace_packages:
+ - libpopt-dev
+ - uuid-dev
+ - python3-dev
+ - python3-sphinx
+ - swig2.0
+ - libglib2.0-dev
--- /dev/null
+---
+# TODO
+__babeltrace_packages:
--- /dev/null
+---
+# 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'
+
+- name: Create sudoers.d directory.
+ file:
+ path: /etc/sudoers.d
+ owner: root
+ group: root
+ mode: 0755
+ state: directory
+
+- name: Set includedir in /etc/sudoers.
+ lineinfile:
+ dest: /etc/sudoers
+ line: "#includedir /etc/sudoers.d"
+ state: present
+ validate: "/usr/sbin/visudo -cf %s"
+
+- name: Create jenkins sudoers file.
+ copy:
+ dest: "/etc/sudoers.d/jenkins"
+ content: "jenkins ALL=NOPASSWD: ALL"
+ mode: 0440
+ owner: root
+ group: root
+ validate: "/usr/sbin/visudo -cf %s"
--- /dev/null
+---
+- 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
--- /dev/null
+---
+- name: Ensure common packages are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: common_packages
--- /dev/null
+---
+__common_packages:
+ - sudo
+ - openjdk-7-jdk
+ - git
+ - vim
+ - tree
+ - htop
+ - build-essential
+ - clang
+ - automake
+ - autoconf
+ - libtool
+ - bison
+ - flex
+ - libtap-harness-archive-perl
+ - jq
+ - cppcheck
+ - python-virtualenv
--- /dev/null
+---
+# TODO
+__common_packages:
+ - java-1.7.0-openjdk-headless
--- /dev/null
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+ include_vars: "{{ ansible_os_family }}.yml"
+
+- name: Define liburcu_packages.
+ set_fact:
+ liburcu_packages: "{{ __liburcu_packages | list }}"
+ when: liburcu_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'
--- /dev/null
+---
+- name: Update apt cache.
+ apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure liburcu build dependencies are installed.
+ apt: "name={{ item }} state=installed"
+ with_items: liburcu_packages
--- /dev/null
+---
+- name: Ensure liburcu build dependencies are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: liburcu_packages
--- /dev/null
+---
+__liburcu_packages: []
--- /dev/null
+---
+# TODO
+__liburcu_packages:
--- /dev/null
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+ include_vars: "{{ ansible_os_family }}.yml"
+
+- name: Define lttng_modules_packages.
+ set_fact:
+ lttng_modules_packages: "{{ __lttng_modules_packages | list }}"
+ when: lttng_modules_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'
+
+- name: checkout repo
+ git: repo=git://artifacts.internal.efficios.com/git/linux-stable.git
+ dest=/home/jenkins/gitcache/linux-stable.git
+ bare=yes
+ sudo: yes
+ sudo_user: jenkins
--- /dev/null
+---
+- name: Update apt cache.
+ apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure lttng-modules build dependencies are installed.
+ apt: "name={{ item }} state=installed"
+ with_items: lttng_modules_packages
+
--- /dev/null
+---
+- name: Ensure lttng-modules build dependencies are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: lttng_modules_packages
--- /dev/null
+---
+__lttng_modules_packages: []
--- /dev/null
+---
+__lttng_modules_packages: []
--- /dev/null
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+ include_vars: "{{ ansible_os_family }}.yml"
+
+- name: Define lttng_tools_packages.
+ set_fact:
+ lttng_tools_packages: "{{ __lttng_tools_packages | list }}"
+ when: lttng_tools_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'
--- /dev/null
+---
+- name: Update apt cache.
+ apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure lttng-tools build dependencies are installed.
+ apt: "name={{ item }} state=installed"
+ with_items: lttng_tools_packages
--- /dev/null
+---
+- name: Ensure lttng-tools build dependencies are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: lttng_tools_packages
--- /dev/null
+---
+__lttng_tools_packages:
+ - libpopt-dev
+ - libxml2-dev
+ - bash-completion
--- /dev/null
+---
+# TODO
+__lttng_tools_packages:
--- /dev/null
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+ include_vars: "{{ ansible_os_family }}.yml"
+
+- name: Define lttng_ust_packages.
+ set_fact:
+ lttng_ust_packages: "{{ __lttng_ust_packages | list }}"
+ when: lttng_ust_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'
--- /dev/null
+---
+- name: Update apt cache.
+ apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure lttng-ust build dependencies are installed.
+ apt: "name={{ item }} state=installed"
+ with_items: lttng_ust_packages
--- /dev/null
+---
+- name: Ensure lttng-ust build dependencies are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: lttng_ust_packages
--- /dev/null
+---
+__lttng_ust_packages:
+ - uuid-dev
+ - texinfo
+ - python3
+ - liblog4j1.2-java
+ - default-jdk
--- /dev/null
+---
+# TODO
+__lttng_ust_packages:
--- /dev/null
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+ include_vars: "{{ ansible_os_family }}.yml"
+
+- name: Define tracecompass_packages.
+ set_fact:
+ tracecompass_packages: "{{ __tracecompass_packages | list }}"
+ when: tracecompass_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'
--- /dev/null
+---
+- name: install pycurl package in order to use the apt_repository module
+ apt: pkg=python-pycurl state=present
+
+- name: Add OpenJDK ppa.
+ apt_repository: repo='ppa:openjdk-r/ppa'
+
+- name: Update apt cache.
+ apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure ubuntu-desktop is installed.
+ apt: "name=ubuntu-desktop install_recommends=no"
+
+- name: Ensure lightdm service is stopped.
+ service: name=lightdm state=stopped enabled=no
+
+- name: Ensure tracecompass build dependencies are installed.
+ apt: "name={{ item }} state=installed"
+ with_items: tracecompass_packages
+
--- /dev/null
+---
+- name: Ensure tracecompass build dependencies are installed.
+ yum:
+ name: "{{ item }}"
+ state: installed
+ with_items: tracecompass_packages
--- /dev/null
+---
+__tracecompass_packages:
+ - openjdk-7-jdk
+ - openjdk-8-jdk
+ - metacity
+ - xfonts-100dpi
+ - xfonts-75dpi
+ - xfonts-scalable
+ - xfonts-cyrillic
+ - xvfb
+ - x11-apps
+ - imagemagick
--- /dev/null
+---
+# TODO
+__tracecompass_packages:
--- /dev/null
+---
+- include: hosts.yml
+- include: slave-armhf.yml
+- include: slave-powerpc.yml
+- include: slave-x32.yml
+- include: slave-x64.yml
--- /dev/null
+- hosts: slave-armhf
+ roles:
+ - common
+ - babeltrace
+ - liburcu
+ - lttng-ust
+ - lttng-tools
--- /dev/null
+- hosts: slave-powerpc
+ roles:
+ - common
+ - babeltrace
+ - liburcu
+ - lttng-ust
+ - lttng-tools
--- /dev/null
+- hosts: slave-x32
+ roles:
+ - common
+ - babeltrace
+ - liburcu
+ - lttng-ust
+ - lttng-tools
+ - lttng-modules
+ - tracecompass
--- /dev/null
+- hosts: slave-x64
+ roles:
+ - common
+ - babeltrace
+ - liburcu
+ - lttng-ust
+ - lttng-tools
+ - lttng-modules
+ - tracecompass