This commit is contained in:
@ -1,4 +1,21 @@
|
||||
---
|
||||
- name: "Use custom Ubuntu mirror"
|
||||
replace:
|
||||
path: /etc/apt/sources.list
|
||||
regexp: 'http://hu.archive.ubuntu.com'
|
||||
replace: 'https://tormakris.jfrog.io/artifactory/ubuntu-mirror'
|
||||
backup: yes
|
||||
|
||||
- name: "Get JFrog password from local environment variable"
|
||||
ansible.builtin.set_fact:
|
||||
artifactory_password: "{{ lookup('env', 'ARTIFACTORY_APT_PASSWORD') }}"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: "Render JFrog credentials configuration"
|
||||
template:
|
||||
src: jrog.conf.template
|
||||
dest: /etc/apt/auth.conf.d/jfrog.conf
|
||||
|
||||
- name: "Remove Ubuntu bloatware"
|
||||
apt:
|
||||
state: absent
|
||||
@ -35,4 +52,5 @@
|
||||
- tcpdump
|
||||
- xxd
|
||||
- git
|
||||
- ncdu
|
||||
...
|
||||
|
3
roles/common/templates/jfrog.conf.template
Normal file
3
roles/common/templates/jfrog.conf.template
Normal file
@ -0,0 +1,3 @@
|
||||
machine tormakris.jfrog.io
|
||||
login apt
|
||||
password {{ artifactory_password }}
|
@ -132,6 +132,10 @@ http {
|
||||
location /.well-known{
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location /.well-known/webfinger {
|
||||
return 301 https://mastodon.tormakristof.eu$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
|
@ -4,8 +4,8 @@ proxy:
|
||||
- {domain: drone.kmlabz.com, ip: drone.intra.tormakris.dev, bigrequests: false}
|
||||
- {domain: git.kmlabz.com, ip: git.intra.tormakris.dev, bigrequests: false}
|
||||
- {domain: guacamole.tormakristof.eu, ip: guacamole.intra.tormakris.dev, bigrequests: false}
|
||||
- {domain: matrix.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: false}
|
||||
- {domain: chat.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: false}
|
||||
- {domain: matrix.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: chat.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: nexus.kmlabz.com, ip: nexus.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: registry.kmlabz.com, ip: nexus.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: swagger.kmlabz.com, ip: swagger.intra.tormakris.dev, bigrequests: false}
|
||||
@ -15,6 +15,7 @@ proxy:
|
||||
- {domain: sharepoint.tormakristof.eu, ip: sharepoint.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: onedrive.tormakristof.eu, ip: sharepoint.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: yt.tormakristof.eu, ip: ytmirror.intra.tormakris.dev, bigrequests: true}
|
||||
- {domain: mastodon.tormakristof.eu, ip: mastodon.intra.tormakris.dev, bigrequests: true}
|
||||
|
||||
static:
|
||||
[]
|
||||
|
@ -88,6 +88,17 @@ http {
|
||||
allow 192.168.69.0/24;
|
||||
deny all;
|
||||
}
|
||||
{%- if server.additionallocations is defined %}
|
||||
{%- for location in server.additionallocations %}
|
||||
location {{location.location}}{
|
||||
{% if location.https %}
|
||||
proxy_pass https://127.0.0.1:{{ location.port }};
|
||||
{% else %}
|
||||
proxy_pass http://127.0.0.1:{{ location.port }};
|
||||
{% endif %}
|
||||
}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
}
|
||||
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user