Skip to content

Commit

Permalink
ansible: macos: /usr/localopt->/usr/local/opt & install ccache
Browse files Browse the repository at this point in the history
Ref: #1955
Ref: #971
Ref: #1347
  • Loading branch information
rvagg committed Oct 16, 2019
1 parent e9ec29b commit 2c0e049
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions ansible/roles/baselayout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
- "{{ packages[os|stripversion]|default('[]') }}"
- "{{ common_packages|default('[]') }}"

- name: Check whether /etc/paths contains "/usr/localopt/ccache/libexec" (macos)
- name: Check whether /etc/paths contains "/usr/local/opt/ccache/libexec" (macos)
when: os|startswith("macos")
command: grep -Fxq "/usr/localopt/ccache/libexec" /etc/paths
command: grep -Fxq "/usr/local/opt/ccache/libexec" /etc/paths
register: ccache_mac
check_mode: no
ignore_errors: yes
Expand All @@ -107,7 +107,7 @@
when: os|startswith("macos") and ccache_mac.rc == 1
lineinfile: dest=/etc/paths
insertbefore=BOF
line='/usr/localopt/ccache/libexec'
line='/usr/local/opt/ccache/libexec'

- name: ubuntu1404 | update package alternatives
when: os == "ubuntu1404"
Expand Down
9 changes: 3 additions & 6 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,15 @@ packages: {
],

'macos10.10': [
'python@2',
'python'
'python@2,python,ccache'
],

'macos10.11': [
'python@2',
'python'
'python@2,python,ccache'
],

'macos10.12': [
'python@2',
'python'
'python@2,python,ccache'
],

rhel72: [
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/templates/start.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export OSTYPE=osx
export ARCH=x64
export DESTCPU=x64

PATH="/usr/localopt/ccache/libexec:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" {{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} \
PATH="/usr/local/opt/ccache/libexec:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" {{ java_path[os] }} -Xmx{{ server_ram|default('128m') }} \
-jar {{ home }}/{{ server_user }}/slave.jar -secret {{ secret }} \
-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp

0 comments on commit 2c0e049

Please sign in to comment.