Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: macos: /usr/localopt->/usr/local/opt & install ccache #1956

Merged
merged 1 commit into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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