Skip to content

Commit

Permalink
ansible: make server_jobs work on FreeBSD in DigitalOcean
Browse files Browse the repository at this point in the history
ansible_processor_vcpus is known to be busted on DigitalOcean for FreeBSD
so we have to have a sensible fall-back
  • Loading branch information
rvagg committed Aug 15, 2018
1 parent 0220f08 commit 59678e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ansible/roles/jenkins-worker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
- name: set jobs_env from server_jobs or ansible_processor_vcpus
set_fact:
jobs_env: "{{ server_jobs|default(ansible_processor_vcpus) }}"
when: server_jobs is defined or ansible_processor_vcpus is defined

- name: set jobs_env from server_jobs or ansible_processor_vcpus
set_fact:
jobs_env: "2"
when: jobs_env is undefined

- name: create group
Expand Down

0 comments on commit 59678e0

Please sign in to comment.