Commit ad1a93a5 authored by Guido Gunther's avatar Guido Gunther
Browse files

Use variables to increase readability a bit

parent 6669963b
......@@ -2,6 +2,17 @@
- hosts: jenkins
user: root
vars:
dev_pkgs:
- git
img_build_pkgs:
- build-essential
- vmdebootstrap
pkg_build_pkgs:
- git-buildpackage
kernel_build_pkgs:
- gcc-arm-linux-gnueabihf
- libssl-dev
roles:
- role: geerlingguy.jenkins
jenkins_package_state: latest # allow upgrades
......@@ -54,21 +65,19 @@
- name: Make sure nginx is running
systemd: name=nginx state=started enabled=yes
# requirements for debian-qemuscripts
- name: Install git
apt: name=git state=present
- name: Install vmdebootstrap
apt: name=vmdebootstrap state=present
- name: Install sudo
apt: name=sudo state=present
- name: Install build-essential
apt: name=build-essential state=present
- name: Install pbuilder
apt: name=pbuilder state=present
- name: Install dev packages
apt:
name: "{{ item }}"
with_items:
- "{{ dev_pkgs }}"
- "{{ img_build_pkgs }}"
- "{{ pkg_build_pkgs }}"
- "{{ kernel_build_pkgs }}"
- name: Allow jenkins to execute certain commands with raised privs
copy:
content: |
%jenkins ALL = (root) SETENV: NOPASSWD: /usr/sbin/debootstrap, /usr/sbin/chroot, /usr/sbin/pbuilder
dest: /etc/sudoers.d/jenkins
dest: /etc/sudoers.d/jenkins
notify: Restart jenkins
handlers:
- name: Restart nginx
......
---
- hosts: jenkins
user: root
tasks:
- name: Install gcc-arm-linux-gnueabihf for kernel builds
apt: name=gcc-arm-linux-gnueabihf state=present
- name: Install libssl-dev for kernel builds
apt: name=libssl-dev state=present
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment