mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-25 18:23:05 +01:00
Add option for install behind http_proxy (#384)
* Add option for install behind http_proxy * Tidy up http_proxy usage
This commit is contained in:
18
roles/k3s_server/tasks/http_proxy.yml
Normal file
18
roles/k3s_server/tasks/http_proxy.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
- name: Create k3s.service.d directory
|
||||
file:
|
||||
path: '{{ systemd_dir }}/k3s.service.d'
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
|
||||
|
||||
- name: Copy K3s http_proxy conf file
|
||||
template:
|
||||
src: "http_proxy.conf.j2"
|
||||
dest: "{{ systemd_dir }}/k3s.service.d/http_proxy.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
@@ -12,6 +12,10 @@
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: Deploy K3s http_proxy conf
|
||||
include_tasks: http_proxy.yml
|
||||
when: proxy_env is defined
|
||||
|
||||
- name: Deploy vip manifest
|
||||
include_tasks: vip.yml
|
||||
|
||||
|
||||
Reference in New Issue
Block a user