mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 10:13:26 +02:00
21 lines
697 B
YAML
21 lines
697 B
YAML
---
|
|
|
|
- name: Configure proxy for yum
|
|
ini_file:
|
|
path: /etc/yum.conf
|
|
section: main
|
|
option: proxy
|
|
value: "{{ (system_proxy is defined and system_proxy != '') | ternary(system_proxy,'') }}"
|
|
state: "{{ (system_proxy is defined and system_proxy != '') | ternary('present','absent') }}"
|
|
tags: proxy
|
|
|
|
- name: Configure proxy for dnf
|
|
ini_file:
|
|
path: /etc/dnf/yum.conf
|
|
section: main
|
|
option: proxy
|
|
value: "{{ (system_proxy is defined and system_proxy != '') | ternary(system_proxy,'') }}"
|
|
state: "{{ (system_proxy is defined and system_proxy != '') | ternary('present','absent') }}"
|
|
when: ansible_distribution_major_version is version('8', '>=')
|
|
tags: proxy
|