From da28d27ff907ac92d12813e738f3b12da5998362 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 22 Apr 2016 13:12:38 -0400 Subject: [PATCH] allow nodes to be configured as 'exclusive' In Jenkins lingo: "exclusive" means that it will only be used on jobs with label restrictions matching the node (vs. the normal which is 'use this node as much as possible') Signed-off-by: Alfredo Deza --- ansible/slave.yml | 2 ++ ansible/slave.yml.j2 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ansible/slave.yml b/ansible/slave.yml index 832ef944..8c6a763e 100644 --- a/ansible/slave.yml +++ b/ansible/slave.yml @@ -5,6 +5,7 @@ user: ubuntu vars: - jenkins_user: 'jenkins-build' + - exclusive: false tasks: - name: create a {{ jenkins_user }} user user: name={{ jenkins_user }} comment="Jenkins Build Slave User" home="/home/{{ jenkins_user }}" @@ -113,3 +114,4 @@ remoteFS: '/home/{{ jenkins_user }}/build' # XXX this should be configurable, not all nodes should have one executor executors: 1 + exclusive: "{{ exclusive }}" diff --git a/ansible/slave.yml.j2 b/ansible/slave.yml.j2 index 18a0b210..cc71fbf0 100644 --- a/ansible/slave.yml.j2 +++ b/ansible/slave.yml.j2 @@ -11,6 +11,7 @@ - api_uri: 'https://jenkins.ceph.com' - nodename: '${nodename}' - labels: '${labels}' + - exclusive: '${exclusive}' tasks: - name: create a {{ jenkins_user }} user user: name={{ jenkins_user }} comment="Jenkins Build Slave User" @@ -151,3 +152,4 @@ remoteFS: '/home/{{ jenkins_user }}/build' # XXX this should be configurable, not all nodes should have one executor executors: 1 + exclusive: "{{ exclusive }}" -- 2.39.5