From: Alfredo Deza Date: Fri, 22 Apr 2016 17:12:38 +0000 (-0400) Subject: allow nodes to be configured as 'exclusive' X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F365%2Fhead;p=ceph-build.git 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 --- 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 }}"