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 @@ ...@@ -2,6 +2,17 @@
- hosts: jenkins - hosts: jenkins
user: root 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: roles:
- role: geerlingguy.jenkins - role: geerlingguy.jenkins
jenkins_package_state: latest # allow upgrades jenkins_package_state: latest # allow upgrades
...@@ -54,21 +65,19 @@ ...@@ -54,21 +65,19 @@
- name: Make sure nginx is running - name: Make sure nginx is running
systemd: name=nginx state=started enabled=yes systemd: name=nginx state=started enabled=yes
# requirements for debian-qemuscripts # requirements for debian-qemuscripts
- name: Install git - name: Install dev packages
apt: name=git state=present apt:
- name: Install vmdebootstrap name: "{{ item }}"
apt: name=vmdebootstrap state=present with_items:
- name: Install sudo - "{{ dev_pkgs }}"
apt: name=sudo state=present - "{{ img_build_pkgs }}"
- name: Install build-essential - "{{ pkg_build_pkgs }}"
apt: name=build-essential state=present - "{{ kernel_build_pkgs }}"
- name: Install pbuilder
apt: name=pbuilder state=present
- name: Allow jenkins to execute certain commands with raised privs - name: Allow jenkins to execute certain commands with raised privs
copy: copy:
content: | content: |
%jenkins ALL = (root) SETENV: NOPASSWD: /usr/sbin/debootstrap, /usr/sbin/chroot, /usr/sbin/pbuilder %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 notify: Restart jenkins
handlers: handlers:
- name: Restart nginx - 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