Files
ansible/roles/proxy_repo/tasks/Rocky.yml
2026-02-21 01:18:50 +01:00

12 lines
385 B
YAML

- name: Setup DNF proxy
become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"
block:
- name: Configure global DNF proxy
ansible.builtin.lineinfile:
path: /etc/dnf/dnf.conf
regexp: '^proxy='
line: 'proxy=http://{{ dnf_proxy_host }}:{{ dnf_proxy_port }}'
insertafter: '^\[main\]'
state: present
backup: yes