Skip to content

Commit f811975

Browse files
committed
ansible: fix macos /usr/localopt -> /usr/local/opt
Ref: #1955 Ref: #971 Ref: #1347
1 parent fb3cf9f commit f811975

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ansible/roles/baselayout/tasks/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@
9595
- "{{ packages[os|stripversion]|default('[]') }}"
9696
- "{{ common_packages|default('[]') }}"
9797

98-
- name: Check whether /etc/paths contains "/usr/localopt/ccache/libexec" (macos)
98+
- name: Check whether /etc/paths contains "/usr/local/opt/ccache/libexec" (macos)
9999
when: os|startswith("macos")
100-
command: grep -Fxq "/usr/localopt/ccache/libexec" /etc/paths
100+
command: grep -Fxq "/usr/local/opt/ccache/libexec" /etc/paths
101101
register: ccache_mac
102102
check_mode: no
103103
ignore_errors: yes
@@ -107,7 +107,7 @@
107107
when: os|startswith("macos") and ccache_mac.rc == 1
108108
lineinfile: dest=/etc/paths
109109
insertbefore=BOF
110-
line='/usr/localopt/ccache/libexec'
110+
line='/usr/local/opt/ccache/libexec'
111111

112112
- name: ubuntu1404 | update package alternatives
113113
when: os == "ubuntu1404"

ansible/roles/jenkins-worker/templates/start.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export OSTYPE=osx
77
export ARCH=x64
88
export DESTCPU=x64
99

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

0 commit comments

Comments
 (0)