Files
k3s-ansible/roles/k3s_agent/tasks/http_proxy.yml
T
2024-02-05 09:46:35 -07:00

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'