mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-09-15 08:33:20 +02:00
38 lines
909 B
YAML
38 lines
909 B
YAML
---
|
|
- name: Manage K3s HTTP Proxy Configuration
|
|
when: proxy_env is defined
|
|
block:
|
|
- name: Create k3s.service.d directory
|
|
ansible.builtin.file:
|
|
path: '{{ systemd_dir }}/k3s.service.d'
|
|
owner: root
|
|
group: root
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
|
|
- name: Deploy the K3s http_proxy configuration file
|
|
ansible.builtin.template:
|
|
src: "http_proxy.conf.j2"
|
|
dest: "{{ systemd_dir }}/k3s.service.d/http_proxy.conf"
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Create k3s-node.service.d directory
|
|
file:
|
|
path: '{{ systemd_dir }}/k3s-node.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-node.service.d/http_proxy.conf"
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|