File tree 5 files changed +22
-6
lines changed
5 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ nexus_data_dir: '/var/nexus'
9
9
nexus_timezone : ' UTC' # java timezone
10
10
nexus_tmp_dir : ' /tmp/nexus'
11
11
12
+ # Nexus default properties
13
+ nexus_default_port : 8081
14
+ nexus_default_context_path : ' /'
15
+
12
16
nexus_admin_password : ' changeme' # Note : admin password change subsequent to first-time install is *not implemented* yet
13
17
nexus_anonymous_access : false
14
18
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Calling Groovy script {{ script_name }}
3
3
uri :
4
- url : " http://localhost:8081/ service/siesta/rest/v1/script/{{ script_name }}/run"
4
+ url : " http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }} service/siesta/rest/v1/script/{{ script_name }}/run"
5
5
user : ' admin'
6
6
password : " {{ current_nexus_admin_password }}"
7
7
headers :
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Removing (potential) previously declared Groovy script {{ item }}
3
3
uri :
4
- url : " http://localhost:8081/ service/siesta/rest/v1/script/{{ item }}"
4
+ url : " http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }} service/siesta/rest/v1/script/{{ item }}"
5
5
user : ' admin'
6
6
password : " {{ current_nexus_admin_password }}"
7
7
method : DELETE
10
10
11
11
- name : Declaring Groovy script {{ item }}
12
12
uri :
13
- url : " http://localhost:8081/ service/siesta/rest/v1/script"
13
+ url : " http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }} service/siesta/rest/v1/script"
14
14
user : ' admin'
15
15
password : " {{ current_nexus_admin_password }}"
16
16
body_format : json
Original file line number Diff line number Diff line change 114
114
- name : Set nexus user
115
115
lineinfile : dest="{{ nexus_installation_dir }}/nexus-latest/bin/nexus.rc" regexp=".*run_as_user=.*" line="run_as_user=\"{{ nexus_os_user }}\""
116
116
117
+ - name : Set nexus port
118
+ lineinfile :
119
+ dest : " {{ nexus_default_settings_file }}"
120
+ regexp : " ^application-port=.*"
121
+ line : " application-port={{ nexus_default_port }}"
122
+
123
+ - name : Set nexus context path
124
+ lineinfile :
125
+ dest : " {{ nexus_default_settings_file }}"
126
+ regexp : " ^nexus-context-path=.*"
127
+ line : " nexus-context-path={{ nexus_default_context_path }}"
128
+
117
129
- name : Bind nexus service to 127.0.0.1 only
118
130
lineinfile :
119
131
dest : " {{ nexus_default_settings_file }}"
153
165
timeout : 1800
154
166
155
167
- name : Waiting for nexus to be ready...
156
- wait_for : port=8081 delay=5
168
+ wait_for : port={{ nexus_default_port }} delay=5
157
169
158
170
- name : Chown configuration files from {{ nexus_installation_dir }}/nexus-latest/etc back to root
159
171
file :
Original file line number Diff line number Diff line change 15
15
RewriteEngine on
16
16
RewriteRule ^/content/([^/]+)/(.*) /repository/$2 [R=301,L]
17
17
18
- ProxyPass / http://localhost:8081/
19
- ProxyPassReverse / http://localhost:8081/
18
+ ProxyPass / http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }}
19
+ ProxyPassReverse / http://localhost:{{ nexus_default_port }}{{ nexus_default_context_path }}
20
20
RequestHeader set X-Forwarded-Proto "https"
21
21
22
22
ErrorLog /var/log/httpd/{{ public_hostname }}_nexus_error.log
You can’t perform that action at this time.
0 commit comments